def DeregisterCredentials(cls, credentials):
    """Deregisters a path specification credentials.

    Args:
      credentials (Credentials): credentials.

    Raises:
      KeyError: if credential object is not set for the corresponding
          type indicator.
    """
    if credentials.type_indicator not in cls._credentials:
      raise KeyError(
          'Credential object not set for type indicator: {0:s}.'.format(
              credentials.type_indicator))

    del cls._credentials[credentials.type_indicator]
Deregisters a path specification credentials.

    Args:
      credentials (Credentials): credentials.

    Raises:
      KeyError: if credential object is not set for the corresponding
          type indicator.