class_docstr: Helper class uses for constructing Python bytecode
class_docstr_tok: ["Helper","class","uses","for","constructing","Python","bytecode"]
docstr: Generate a LOAD_GLOBAL instruction to fetch a given python module.
docstr_tok: ["Generate","a","LOAD_GLOBAL","instruction","to","fetch","a","given","python","module","."]
code: def create_load_python_module(self, mod, push_null) -> Instruction:
      """
      Generate a LOAD_GLOBAL instruction to fetch a given python module.
      """
      global_scope = self.tx.output.global_scope
      name = re.sub(r"^.*[.]", "", mod.__name__)
      if global_scope.get(name, None) is mod:
          return self.create_load_global(name, push_null, add=True)
      mangled_name = f"___module_{name}_{id(mod)}"
      if mangled_name not in global_scope:
          self.tx.output.install_global(mangled_name, mod)
      return self.create_load_global(mangled_name, push_null, add=True)
  
imports: import collections
  import dataclasses
  import re
  import sys
  import types
  from typing import Counter, Dict, List, Optional
  import torch.nn
  from .None import utils
  from .bytecode_transformation import create_call_function, create_dup_top, create_instruction, create_load_global, create_rot_n, Instruction
  from .exc import unimplemented
  from .source import AttrSource, Source
  from .utils import is_safe_constant, rot_n_helper
  from .variables.base import VariableTracker
  from .variables.nn_module import NNModuleVariable
  from .variables.tensor import NumpyNdarrayVariable, SymNodeVariable, TensorVariable, UnspecializedPythonVariable
  from .variables.torch_function import TensorWithTFOverrideVariable
label_desc: Use image node_id 26 for calling the PyCodegen obj's underlying member method code with example usage: obj.create_load_python_module(mod, push_null) and returns: self, self