@staticmethod<EOL><INDENT>def get_outerframe_skip_importlib_frame(level):<DEDENT>
if sys.version_info < (<NUM_LIT:3>, <NUM_LIT:4>):<EOL><INDENT>return sys._getframe(level)<EOL><DEDENT>else:<EOL><INDENT>currentframe = inspect.currentframe()<EOL>levelup = <NUM_LIT:0><EOL>while levelup < level:<EOL><INDENT>currentframe = currentframe.f_back<EOL>if currentframe.f_globals['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>levelup += <NUM_LIT:1><EOL><DEDENT><DEDENT>return currentframe<EOL><DEDENT>
There's a bug in Python3.4+, see http://bugs.python.org/issue23773,
remove this and use sys._getframe(3) when bug is fixed