code: def RegisterCredentials(cls, credentials):
      
      if credentials.type_indicator in cls._credentials:
        raise KeyError(
            'Credentials object already set for type indicator: {0:s}.'.format(
                credentials.type_indicator))
  
      cls._credentials[credentials.type_indicator] = credentials
docs: Registers a path specification credentials.
  
      Args:
        credentials (Credentials): credentials.
  
      Raises:
        KeyError: if credentials object is already set for the corresponding
            type indicator.