code: def CreateSourceType(cls, type_indicator, attributes):
      
      if type_indicator not in cls._source_type_classes:
        raise errors.FormatError(
            'Unsupported type indicator: {0:s}.'.format(type_indicator))
  
      return cls._source_type_classes[type_indicator](**attributes)
docs: Creates a source type.
  
      Args:
        type_indicator (str): source type indicator.
        attributes (dict[str, object]): source type attributes.
  
      Returns:
        SourceType: a source type.
  
      Raises:
        FormatError: if the type indicator is not set or unsupported,
            or if required attributes are missing.