Function Level Imports of Flame Module

Hi hi!

I was wondering if anyone could shed light on why it seems to be the common practice to import the Flame module inside of functions instead of a top level module import like the PEP8 standard?

I have not experienced any issues thus far by doing top level imports… but perhaps Ive only been lucky.

Thanks in advance

I suppose to specifically call an example, i see this in /opt/Autodesk/flame_####.#/python_examples/

I was wondering about the same thing. I always do top level imports, but noticed one thing:
The flame module seems to be not available yet while the python scripts are crawled during startup. I get messages like “no module found called flame”. On runtime there are no issues and the module is loaded as expected.