code: def is_token_expired(self, margin=None):
          
          if self.token is None:
              return None
          return not utils.is_token_valid(self.token, margin)
docs: Determine if the token is expired.
  
          :returns:
            ``True`` if the token is expired, ``False`` if not, and
            ``None`` if there is no token set.
  
          :param margin:
             A security time margin in seconds before real expiration.
             Will return ``True`` if the token expires in less than ``margin``
             seconds of time.
             A default margin can be set by the TOKEN_TIMEOUT_MARGIN in the
             django settings.