code: def s3_secrets(request: SubRequest) -> Dict[str, str]:
      """
      Connect to S3 secretsmanager to get the secret values used in integrations tests.
      """
      secret_name = "integrations-s3"
      region_name = "us-west-2"
  
      # Create a Secrets Manager client
      session = boto3.session.Session()
      client = session.client(
          service_name="secretsmanager", region_name=region_name
      )
      response = client.get_secret_value(SecretId=secret_name)
  
      return cast(Dict[str, str], json.loads(response["SecretString"]))
  
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 4 for calling a global function with example usage: s3_secrets(request) and returns: cast