code: def user(self, username):
          
          for user in self.users():
              # Home users don't have email, username etc.
              if username.lower() == user.title.lower():
                  return user
  
              elif (user.username and user.email and user.id and username.lower() in
                   (user.username.lower(), user.email.lower(), str(user.id))):
                  return user
  
          raise NotFound('Unable to find user %s' % username)
docs: Returns the :class:`~plexapi.myplex.MyPlexUser` that matches the email or username specified.
  
              Parameters:
                  username (str): Username, email or id of the user to return.