code: def TypeFactory(type_):
      if isinstance(type_, type) and issubclass(type_, Type):
          return type_
      for x in __types__:
          if x.represents(type_):
              return x.get(type_)
      raise UnknownType(type_)