code: def add_extension(module, name, code):
      """Register an extension code."""
      code = int(code)
      if not 1 <= code <= 0x7FFFFFFF:
          raise ValueError("code out of range")
      key = (module, name)
      if (
          _extension_registry.get(key) == code
          and _inverted_registry.get(code) == key
      ):
          return  # Redundant registrations are benign
      if key in _extension_registry:
          raise ValueError(
              "key %s is already registered with code %s"
              % (key, _extension_registry[key])
          )
      if code in _inverted_registry:
          raise ValueError(
              "code %s is already in use for key %s"
              % (code, _inverted_registry[code])
          )
      _extension_registry[key] = code
      _inverted_registry[code] = key
  
file_path: cpython/Lib/copyreg.py
label_desc: Use image node_id 10 for calling a global function with example usage: add_extension(module, name, code) without return types