code: def _ParseCredentialOptions(self, options):
      
      credentials = getattr(options, 'credentials', [])
      if not isinstance(credentials, list):
        raise errors.BadConfigOption('Unsupported credentials value.')
  
      for credential_string in credentials:
        credential_type, _, credential_data = credential_string.partition(':')
        if not credential_type or not credential_data:
          raise errors.BadConfigOption(
              'Badly formatted credential: {0:s}.'.format(credential_string))
  
        if credential_type not in self._SUPPORTED_CREDENTIAL_TYPES:
          raise errors.BadConfigOption(
              'Unsupported credential type for: {0:s}.'.format(
                  credential_string))
  
        if credential_type in self._BINARY_DATA_CREDENTIAL_TYPES:
          try:
            credential_data = credential_data.decode('hex')
          except TypeError:
            raise errors.BadConfigOption(
                'Unsupported credential data for: {0:s}.'.format(
                    credential_string))
  
        self._credentials.append((credential_type, credential_data))
docs: Parses the credential options.
  
      Args:
        options (argparse.Namespace): command line arguments.
  
      Raises:
        BadConfigOption: if the options are invalid.