code: def register_subclass(cls, typeid):
          
          def decorator(subclass):
              cls._subcls_lookup[typeid] = subclass
              subclass.typeid = typeid
              return subclass
          return decorator
docs: Register a subclass so from_dict() works
  
          Args:
              typeid (str): Type identifier for subclass