def METHOD_NAME(user_email, token_time=None):
  """Return a security token specifically for the given user.
  Args:
    user_email: email addr of the user viewing an HTML form.  This can
        be None for anon vistors.
    token_time: Time at which the token is generated in seconds since the epoch.
  Returns:
    A url-safe security token.  The token is a string with the digest
    the email and time, followed by plain-text copy of the time that is
    used in validation.
  Raises:
    ValueError: if the XSRF secret was not configured.
  """
  token_time = token_time or int(time.time())
  token_time = str(token_time).encode()
  digester = hmac.new(secrets.get_xsrf_secret().encode(),
                      digestmod=hashlib.sha256)
  digester.update(user_email.encode() if user_email else b'')
  digester.update(DELIMITER)
  digester.update(token_time)
  digest = digester.digest()
  binary_token = base64.urlsafe_b64encode(digest+ DELIMITER + token_time)
  token = binary_token.decode()
  return token