<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def RegisterCredentials(cls, credentials):
 """Registers a path specification credentials. Args: credentials (Credentials):
 credentials. Raises: KeyError: if credentials object is already set for the corresponding type indicator. """

    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