code: def checkpoint_storage_config(request: SubRequest) -> Dict[str, Any]:
      command = [
          "det",
          "-m",
          config.make_master_url(),
          "master",
          "config",
          "--json",
      ]
  
      with logged_in_user(config.ADMIN_CREDENTIALS):
          output = subprocess.check_output(
              command, universal_newlines=True, stderr=subprocess.PIPE
          )
  
      checkpoint_config = json.loads(output)["checkpoint_storage"]
  
      if checkpoint_config["type"] == "s3":
          secret_conf = s3_secrets(request)
          checkpoint_config["bucket"] = secret_conf[
              "INTEGRATIONS_S3_BUCKET"
          ]
          checkpoint_config["access_key"] = secret_conf[
              "INTEGRATIONS_S3_ACCESS_KEY"
          ]
          checkpoint_config["secret_key"] = secret_conf[
              "INTEGRATIONS_S3_SECRET_KEY"
          ]
  
      return cast(Dict[str, Any], checkpoint_config)
  
imports: import json
  import subprocess
  import time
  from pathlib import Path
  from typing import Any, Callable, Dict, Iterator, Optional, cast
  import boto3
  import pytest
  from _pytest.config.argparsing import Parser
  from _pytest.fixtures import SubRequest
  from botocore import exceptions
  from determined.experimental import client
  from tests import config
  from tests.experiment import profile_test
  from tests.nightly.compute_stats import compare_stats
  from .cluster.test_users import logged_in_user
  from .cluster_log_manager import ClusterLogManager
label_desc: Use image node_id 6 for calling a global function with example usage: checkpoint_storage_config(request) and returns: cast