def load_module(self, module_name):
if module_name != self.module_name:<EOL><INDENT>raise LoaderError(<EOL>'<STR_LIT>')<EOL><DEDENT>if module_name in sys.modules:<EOL><INDENT>return sys.modules[module_name]<EOL><DEDENT>module = self.load_module_py_path(module_name, self.load_target)<EOL>if self.is_pkg:<EOL><INDENT>module.__path__ = [self.module_path]<EOL>module.__package__ = module_name<EOL><DEDENT>else:<EOL><INDENT>module.__package__ = module_name.rpartition('<STR_LIT:.>')[<NUM_LIT:0>]<EOL><DEDENT>sys.modules[module_name] = module<EOL>return module<EOL>
Loads a module's code and sets the module's expected hidden
variables. For more information on these variables and what they
are for, please see PEP302.

:param module_name: the full name of the module to load