@utils.Synchronized
  def NewNonce(self):
    now = time.time()
    if len(self.nonces) >= self.MAX_NONCES:
      self._InvalidateOldNonces(now)
      return None

    nonce = str(uuid.uuid4())
    if nonce in self.nonces:
      # This shouldn't really happen.
      return None

    if len(self.nonces) >= self.MAX_NONCES / 10:
      self._InvalidateOldNonces(now)
    self.nonces[nonce] = now

    return nonce
Return True if either stderr or stdout has colors enabled.
dataset/ETHPy150Open google/grr/grr/server/data_server/auth.py/NonceStore.NewNonce--crossover with--dataset/ETHPy150Open Robpol86/colorclass/colorclass/windows.py/Windows.is_enabled