<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_username_from_userinfo(self, user_info):
 """ Get the user's username from the jwt sub property """


        subject = user_info['sub']
        email = user_info['email']

        if "Mozilla-LDAP" in subject:
            return "mozilla-ldap/" + email
        elif "email" in subject:
            return "email/" + email
        elif "github" in subject:
            return "github/" + email
        elif "google" in subject:
            return "google/" + email
        # Firefox account
        elif "oauth2" in subject:
            return "oauth2/" + email
        else:
            raise AuthenticationFailed("Unrecognized identity")