<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _format_credentials(self):
 """ Returns the current credentials in the format expected by the authentication service. """

        tenant_name = self.tenant_name or self.username
        tenant_id = self.tenant_id or self.username
        return {"auth": {"passwordCredentials":
                {"username": tenant_name,
                "password": self.password,
                },
                "tenantId": tenant_id}}