def is_important_frame(self, important_module, tb):
        """Checks a single frame if it's important."""
        g = tb.tb_frame.f_globals
        if '__name__' not in g:
            return False

        module_name = g['__name__']

        # Python 2.7 Behavior.  Modules are cleaned up late so the
        # name shows up properly here.  Success!
        if module_name == important_module:
            return True

        # Some python verisons will will clean up modules so early that the
        # module name at that point is no longer set.  Try guessing from
        # the filename then.
        filename = os.path.abspath(tb.tb_frame.f_code.co_filename)
        test_string = os.path.sep + important_module.replace('.', os.path.sep)
        return filename in test_string + '.py' or \
               test_string + os.path.sep + '__init__.py' in filename
dataset/ETHPy150Open baseblack/ReproWeb/3rdParty/python/flask/exthook.py/ExtensionImporter.is_important_frame/swapped operands of `in`