def _normalize_module(module, depth=<NUM_LIT:2>):
if inspect.ismodule(module):<EOL><INDENT>return module<EOL><DEDENT>elif isinstance(module, str):<EOL><INDENT>return __import__(module, globals(), locals(), ["<STR_LIT:*>"])<EOL><DEDENT>elif module is None:<EOL><INDENT>return sys.modules[sys._getframe(depth).f_globals['<STR_LIT>']]<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>
Return the module specified by `module`.  In particular:
  - If `module` is a module, then return module.
  - If `module` is a string, then import and return the
    module with that name.
  - If `module` is None, then return the calling module.
    The calling module is assumed to be the module of
    the stack frame at the given depth in the call stack.