code: def for_user(cls, user):
          
          user_id = getattr(user, api_settings.USER_ID_FIELD)
          if not isinstance(user_id, int):
              user_id = str(user_id)
  
          token = cls()
          token[api_settings.USER_ID_CLAIM] = user_id
  
          return token
docs: Returns an authorization token for the given user that will be provided
          after authenticating the user's credentials.