code: def RegisterSourceType(cls, source_type_class):
      
      if source_type_class.TYPE_INDICATOR in cls._source_type_classes:
        raise KeyError(
            'Source type already set for type: {0:s}.'.format(
                source_type_class.TYPE_INDICATOR))
  
      cls._source_type_classes[source_type_class.TYPE_INDICATOR] = (
          source_type_class)
docs: Registers a source type.
  
      Source types are identified based on their type indicator.
  
      Args:
        source_type_class (type): source type.
  
      Raises:
        KeyError: if source types is already set for the corresponding
            type indicator.