class_docstr: Provides a type registry for the python registry pattern.
  
  Contains mappings between types and type specific objects, to implement the
  registry pattern.
  
  Some example uses of this would be to register different functions depending
  on the type of object.
class_docstr_tok: ["Provides","a","type","registry","for","the","python","registry","pattern",".","Contains","mappings","between","types","and","type","specific","objects",",","to","implement","the","registry","pattern",".","Some","example","uses","of","this","would","be","to","register","different","functions","depending","on","the","type","of","object","."]
docstr: Registers a Python object within the registry.
  
  Args:
    obj: The object to add to the registry.
    value: The stored value for the 'obj' type.
  
  Raises:
    KeyError: If the same obj is used twice.
docstr_tok: ["Registers","a","Python","object","within","the","registry",".","Args",":","obj",":","The","object","to","add","to","the","registry",".","value",":","The","stored","value","for","the","'obj","'","type",".","Raises",":","KeyError",":","If","the","same","obj","is","used","twice","."]
code: def register(self, obj, value):
      """Registers a Python object within the registry.
  
      Args:
        obj: The object to add to the registry.
        value: The stored value for the 'obj' type.
  
      Raises:
        KeyError: If the same obj is used twice.
      """
      if obj in self._registry:
          raise KeyError(f"{type(obj)} has already been registered.")
      self._registry[obj] = value
  
label_desc: Use image node_id 2 for calling the TypeRegistry obj's underlying member method code with example usage: obj.register(obj, value) without return types