code: def create_config_files(api_key: str, agent_image: Optional[str]):
      """Create a launch-config.yml and launch-agent.yml."""
      launch_config = yaml.load_all(
          open(
              "wandb/sdk/launch/deploys/kubernetes/launch-config.yaml"
          ),
          Loader=yaml.Loader,
      )
      launch_config_patch = yaml.load_all(
          open(
              "tests/release_tests/test_launch/launch-config-patch.yaml"
          ),
          Loader=yaml.Loader,
      )
      final_launch_config = []
      for original, updated in zip(launch_config, launch_config_patch):
          document = dict(original)
          update_dict(document, dict(updated))
          final_launch_config.append(document)
      final_launch_config[-1]["stringData"]["password"] = api_key
      yaml.dump_all(
          final_launch_config,
          open(
              "tests/release_tests/test_launch/launch-config.yml", "w+"
          ),
      )
      launch_agent = yaml.load(
          open("wandb/sdk/launch/deploys/kubernetes/launch-agent.yaml"),
          Loader=yaml.Loader,
      )
      launch_agent_patch = dict(
          yaml.load(
              open(
                  "tests/release_tests/test_launch/launch-agent-patch.yaml"
              ),
              Loader=yaml.Loader,
          )
      )
      if agent_image:
          launch_agent_patch["spec"]["template"]["spec"]["containers"][
              0
          ]["image"] = agent_image
      launch_agent_dict = dict(launch_agent)
      update_dict(launch_agent_dict, launch_agent_patch)
      yaml.dump(
          launch_agent_dict,
          open(
              "tests/release_tests/test_launch/launch-agent.yml", "w+"
          ),
      )
  
file_path: wandb/tests/release_tests/test_launch/utils.py
imports: import signal
  import subprocess
  import sys
  from time import sleep
  from typing import Optional
  import wandb
  import yaml
  from kubernetes import client, config, watch
  from wandb.apis.public import Api
label_desc: Use image node_id 9 for calling a global function with example usage: create_config_files(api_key, agent_image) without return types