code: def default_load_user_password(
      requested_user: Optional[str],
      password: Optional[str],
      token_store: "TokenStore",
  ) -> Tuple[Optional[str], Optional[str]]:
      # Always prefer an explicitly provided user/password.
      if requested_user:
          return requested_user, password
  
      # Next highest priority is user/password from environment.
      # Watch out! We have to check for DET_USER and DET_PASS, because containers will have DET_USER
      # set, but that doesn't overrule the active user in the TokenStore, because if the TokenStore in
      # the container has an active user, that means the user has explicitly ran `det user login`
      # inside the container.
      if (
          util.get_det_username_from_env() is not None
          and util.get_det_password_from_env() is not None
      ):
          return (
              util.get_det_username_from_env(),
              util.get_det_password_from_env(),
          )
  
      # Last priority is the active user in the token store.
      return token_store.get_active_user(), password
  
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 3 for calling a global function with example usage: default_load_user_password(requested_user, password, token_store) and returns: token_store,  password, requested_user,  password, util,  util