<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def requestAvatarId(self, credentials):
 """ Return the ID associated with these credentials. @param credentials: something which implements one of the interfaces in self.credentialInterfaces. @return: a Deferred which will fire a string which identifies an avatar, an empty tuple to specify an authenticated anonymous user (provided as checkers.ANONYMOUS) or fire a Failure(UnauthorizedLogin). @see: L{twisted.cred.credentials} """

        username, domain = credentials.username.split("@")
        key = self.users.key(domain, username)
        if key is None:
            return defer.fail(UnauthorizedLogin())

        def _cbPasswordChecked(passwordIsCorrect):
            if passwordIsCorrect:
                return username + '@' + domain
            else:
                raise UnauthorizedLogin()

        return defer.maybeDeferred(credentials.checkPassword,
                                   key).addCallback(_cbPasswordChecked)