code: def register_typeset(self, name, typeset):
      if name in self.registry:
          raise TypeError(
              "TypeSet %s already defined with types %s"
              % (name, self.registry[name].types)
          )
      self.registry[name] = typeset
      return typeset
  
imports: from itertools import chain
  from .coretypes import Unit, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, complex64, complex128, bool_, Decimal, TimeDelta, Option
label_desc: Use image node_id 2 for calling the TypesetRegistry obj's underlying member method code with example usage: obj.register_typeset(name, typeset) and returns: typeset