title: Importing classes and NameError
body: <p>Don't see much point in posting whole of an actual code here, so I'll try my best to generalize my problem.
  Function(let it be named x) is defined at the start of the code.
  Then the class(which has a method z, and z is eventually calling x) is imported from separate .py file. Object of that class is created. After z is called, I get "global name 'x' is not defined" error.
  Then I thought I paste all the code from my .py files in a single file, put def(x) on top of it, and see what happens. Of course, it worked as intended. Don't get what is the problem with previous way(which I'd prefer to stick with), isn't it virtually the same?</p>