Resolve username and handle deprecation of account kwarg

def _resolve_username(self, account, username):
        """Resolve username and handle deprecation of account kwarg"""
        if account is not None:
            warnings.warn(
                "Use keyword argument 'username' instead of 'account'",
                DeprecationWarning)
        return username or account or self.username