class_docstr: A generic Python-to-Python transpiler.
  
  Its `transform` method offers a function-in, function-out interface.
  Internally, it takes care of parsing, caching and loading of the translated
  code.
  
  Users typically subclass this, overriding `transform_ast`.
  
  Usually, instances of this class are singletons, since each instance manages
  its own cache. The caching can be controlled by overriding `get_caching_key`.
  
  Example:
  
      class MyTransformer(PyToPy):
  
        def transform_ast(self, node, ctx):
          node = <<transform node, usually using ast.NodeTransformer classes>>
          return node
  
      transformer = MyTransfomer()
  
      new_f, module, source_map = transformer.transform_function(f, ...)
      # new_f is a function with signature identical to f
  
  The transformed function has access to the same namespace as the original
  function. To allow access to internal APIs, users may inject additional
  symbols by overriding `get_extra_locals`.
class_docstr_tok: ["A","generic","Python-to-Python","transpiler",".","Its","`","transform","`","method","offers","a","function-in",",","function-out","interface",".","Internally",",","it","takes","care","of","parsing",",","caching","and","loading","of","the","translated","code",".","Users","typically","subclass","this",",","overriding","`","transform_ast","`",".","Usually",",","instances","of","this","class","are","singletons",",","since","each","instance","manages","its","own","cache",".","The","caching","can","be","controlled","by","overriding","`","get_caching_key","`",".","Example",":","class","MyTransformer","(","PyToPy",")",":","def","transform_ast","(","self",",","node",",","ctx",")",":","node","=","<","<","transform","node",",","usually","using","ast.NodeTransformer","classes",">",">","return","node","transformer","=","MyTransfomer","(",")","new_f",",","module",",","source_map","=","transformer.transform_function","(","f",",","...",")","#","new_f","is","a","function","with","signature","identical","to","f","The","transformed","function","has","access","to","the","same","namespace","as","the","original","function",".","To","allow","access","to","internal","APIs",",","users","may","inject","additional","symbols","by","overriding","`","get_extra_locals","`","."]
docstr: Returns a unique key to use for caching.
  
  Subclasses must override this.
  
  Calls made to `transform_function` with functions that have the same code
  object and caching key will return a cached instance on subsequent
  invocations.
  
  Args:
    user_context: The context object which was passed to `transform`.
  
  Returns:
    extra_locals: A hashable.
docstr_tok: ["Returns","a","unique","key","to","use","for","caching",".","Subclasses","must","override","this",".","Calls","made","to","`","transform_function","`","with","functions","that","have","the","same","code","object","and","caching","key","will","return","a","cached","instance","on","subsequent","invocations",".","Args",":","user_context",":","The","context","object","which","was","passed","to","`","transform","`",".","Returns",":","extra_locals",":","A","hashable","."]
code: def get_caching_key(self, user_context):
      """Returns a unique key to use for caching.
  
      Subclasses must override this.
  
      Calls made to `transform_function` with functions that have the same code
      object and caching key will return a cached instance on subsequent
      invocations.
  
      Args:
        user_context: The context object which was passed to `transform`.
  
      Returns:
        extra_locals: A hashable.
      """
      raise NotImplementedError("subclasses must override this")
  
imports: import inspect
  import threading
  import types
  import gast
  from nvidia.dali._autograph.pyct import cache
  from nvidia.dali._autograph.pyct import gast_util
  from nvidia.dali._autograph.pyct import inspect_utils
  from nvidia.dali._autograph.pyct import loader
  from nvidia.dali._autograph.pyct import naming
  from nvidia.dali._autograph.pyct import origin_info
  from nvidia.dali._autograph.pyct import parser
  from nvidia.dali._autograph.pyct import templates
  from nvidia.dali._autograph.pyct import transformer
  from nvidia.dali._autograph.utils import ag_logging
label_desc: Use image node_id 3 for calling the PyToPy obj's underlying member method code with example usage: obj.get_caching_key(user_context) without return types