docs: def get_token_obj(self, token, expire=_token_default):
          """Returns or creates the object associaten with the given token.
  
          Parameters
          ----------
          token : string
              The token for the object as returned by `create_token`.
  
          expire : number or None
              The number of seconds until the object associated with the token
              expires or `None` if it should not expire. If the argument is
              omitted the value returned by `get_default_token_expiration` is
              used. The expiration of an object is lazy. That means the memory
              of the expired object is not freed until the next call of
              `get_token_obj`. An expiration of 0 or less immediately frees
              the memory of the token.
          """
          if expire == _token_default:
              expire = self.get_default_token_expiration()
          now = get_time()
          until = now + expire if expire is not None else None
          with self._token_lock:
              # _token_timings is keys sorted by time
              first_valid = None
              for (pos, k) in enumerate(self._token_timings):
                  t = self._token_map[k][0]
                  if t is None or t > now:
                      first_valid = pos
                      break
              if first_valid is None:
                  self._token_map = {}
                  self._token_timings = []
              else:
                  for k in self._token_timings[:first_valid]:
                      del self._token_map[k]
                  self._token_timings = self._token_timings[first_valid:]
              if until is None or until > now:
                  if token not in self._token_map:
                      self._token_map[token] = (until, {})
                      self._token_timings.append(token)
                  else:
                      self._token_map[token] = (until, self._token_map[token][1])
                  self._token_timings.sort(key=lambda k: (
                      1 if self._token_map[k][0] is None else 0,
                      self._token_map[k][0]
                  ))
                  return self._token_map[token][1]
              else:
                  if token in self._token_map:
                      self._token_timings = [
                          k for k in self._token_timings if k != token
                      ]
                      del self._token_map[token]
                  return {}