code: def access_token(self, cookie):
          
          if (cookie):
              token = self._generate_random_string(self.access_tokens)
              self.access_tokens[token] = (cookie, int(time.time()))
              return token
          else:
              return None
docs: Make and store access token as proxy for the access cookie.
  
          Create an access token to act as a proxy for access cookie, add it to
          the dict of accepted access tokens with (cookie, current timestamp)
          as the value. Return the access token. Return None if cookie is not set.