code: def pytest_configure(config):
      """Fixture to confirm the session has the correct credentials."""
      client_config = botocore.config.Config(region_name="us-east-2")
      sts = boto3.client("sts", config=client_config)
      try:
          sts.get_caller_identity()
      except botocore.exceptions.ClientError:
          raise Exception("Not logged into LaunchSandbox AWS account")
  
      default_image = "wandb-launch-agent:release-testing"
      agent_image = config.option.agent_image
      if not agent_image:
          run_cmd(
              f"python tools/build_launch_agent.py --tag {default_image}"
          )
  
      default_base_url = "api.wandb.ai"
      if not config.option.base_url:
          config.option.base_url = default_base_url
  
      if not config.option.api_key:
          n = netrc()
          # returns tuple in format (login, account, key)
          config.option.api_key = n.authenticators(
              config.option.base_url
          )[2]
  
      creds_path = os.path.expanduser("~/.aws")
      run_cmd(
          "kubectl delete secret generic aws-secret --ignore-not-found -n wandb-release-testing"
      )
      run_cmd(
          f"kubectl create secret generic aws-secret --from-file={creds_path} -n wandb-release-testing"
      )
  
file_path: wandb/tests/release_tests/test_launch/conftest.py
imports: import os
  from netrc import netrc
  import boto3
  import botocore
  from utils import run_cmd
label_desc: Use image node_id 3 for calling a global function with example usage: pytest_configure(config) without return types