Is there a way to disable it locally?
I'm using the following block to allow me to use "@profile" decorators which are only defined when running under line profiler (kernprof -l script.py)
I'd like to disable the warning on "profile" inside the "try/except", since I'm handling the UnboundLocal error in the code
# for line profiling
profile # throws an exception when profile isn't defined
profile = identity # if it's not defined simply ignore the decorator.