code: def validate_token_store_v1(store: Any) -> bool:
      """
      Valid v1 schema example:
  
          {
            "version": 1,
            "masters": {
              "master_url_a": {
                "active_user": "user_a",
                "tokens": {
                  "user_a": "TOKEN",
                  "user_b": "TOKEN"
                }
              },
              "master_url_b": {
                "active_user": "user_c",
                "tokens": {
                  "user_c": "TOKEN",
                  "user_d": "TOKEN"
                }
              }
            }
          }
  
      Note that store["masters"] is a mapping of string url's to valid v0 schemas.
      """
      if not isinstance(store, dict):
          raise api.errors.CorruptTokenCacheException()
  
      if len(set(store.keys()).difference({"version", "masters"})) > 0:
          # Extra keys.
          raise api.errors.CorruptTokenCacheException()
  
      # Handle version.
      version = store.get("version")
      if version != 1:
          raise api.errors.CorruptTokenCacheException()
  
      if "masters" in store:
          masters = store["masters"]
          if not isinstance(masters, dict):
              raise api.errors.CorruptTokenCacheException()
  
          # Each entry of masters must be a master_url/substore pair.
          for key, val in masters.items():
              if not isinstance(key, str):
                  raise api.errors.CorruptTokenCacheException()
              validate_token_store_v0(val)
  
      return True
  
imports: import argparse
  import contextlib
  import functools
  import getpass
  import hashlib
  import json
  import pathlib
  from typing import Any, Callable, Dict, Iterator, List, NamedTuple, Optional, Tuple, cast
  import filelock
  import determined
  from determined.common import api, constants, util
  from determined.common.api import bindings, certs
label_desc: Use image node_id 10 for calling a global function with example usage: validate_token_store_v1(store) and returns: True