def METHOD_NAME(self, device: Dict, credentials: Dict[str, Dict]):
    """write and validate input credentials for a device
    Args:
        device (Dict): device to add credentials
        credentials (Dict[str, Dict]): device's credentials
    Raises:
        InventorySourceError: Invalid credentials
    """
    missing_keys = self._validate_credentials(credentials)
    if missing_keys:
        raise InventorySourceError(
            f'Invalid credentials: missing keys {missing_keys}')
    device.update(credentials)