code: def handle_token(master_url: str, token: str) -> None:
      tmp_auth = {"Cookie": "auth={token}".format(token=token)}
      me = api.get(
          master_url, "/users/me", headers=tmp_auth, authenticated=False
      ).json()
  
      token_store = authentication.TokenStore(master_url)
      token_store.set_token(me["username"], token)
      token_store.set_active(me["username"])
  
      print("Authenticated as {}.".format(me["username"]))
  
file_path: determined/harness/determined/cli/sso.py
imports: import sys
  import webbrowser
  from argparse import Namespace
  from getpass import getpass
  from http.server import BaseHTTPRequestHandler, HTTPServer
  from typing import Any, Callable, List
  from urllib.parse import parse_qs, urlparse
  from determined.common import api
  from determined.common.api import authentication
  from determined.common.declarative_argparse import Arg, Cmd
  from determined.errors import EnterpriseOnlyError
label_desc: Use image node_id 1 for calling a global function with example usage: handle_token(master_url, token) without return types