code: def mock_kubernetes_clients(monkeypatch):
      mock_config_map = MagicMock()
      mock_config_map.metadata = MagicMock()
      mock_config_map.metadata.name = "test-config-map"
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1ConfigMap", mock_config_map
      )
  
      mock_batch_client = MagicMock(name="batch-client")
      mock_batch_client.read_name_spaced_job_log = AsyncMock(
          return_value=MagicMock()
      )
      mock_batch_client.create_namespaced_job = AsyncMock(
          return_value=MagicMock()
      )
      mock_batch_client.delete_namespaced_job = AsyncMock(
          return_value=MagicMock()
      )
  
      mock_core_client = MagicMock(name="core-client")
      mock_core_client.create_namespaced_config_map = AsyncMock(
          return_value=None
      )
      mock_core_client.delete_namespaced_config_map = AsyncMock(
          return_value=None
      )
  
      mock_job = MagicMock(name="mock_job")
      mock_job_status = MagicMock()
      mock_job.status = mock_job_status
      # test success is true
      mock_job_status.succeeded = 1
      mock_batch_client.read_namespaced_job_status = AsyncMock(
          return_value=mock_job
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client,
          "BatchV1Api",
          MagicMock(return_value=mock_batch_client),
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client,
          "CoreV1Api",
          MagicMock(return_value=mock_core_client),
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1PodSpec", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1Volume", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1JobSpec", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1Job", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1PodTemplateSpec", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1Container", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1VolumeMount", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client,
          "V1SecretVolumeSource",
          return_kwargs,
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client,
          "V1ConfigMapVolumeSource",
          return_kwargs,
      )
      monkeypatch.setattr(
          kubernetes_asyncio.client, "V1ObjectMeta", return_kwargs
      )
      monkeypatch.setattr(
          kubernetes_asyncio.config,
          "load_incluster_config",
          return_kwargs,
      )
      yield mock_core_client, mock_batch_client
  
imports: import os
  from unittest.mock import MagicMock
  import boto3
  import kubernetes_asyncio
  import pytest
  import wandb
  from google.cloud import storage
  from wandb.sdk.launch._project_spec import EntryPoint, LaunchProject
  from wandb.sdk.launch.builder.kaniko_builder import KanikoBuilder, _wait_for_completion
  from wandb.sdk.launch.environment.aws_environment import AwsEnvironment
  from wandb.sdk.launch.environment.azure_environment import AzureEnvironment
  from wandb.sdk.launch.registry.azure_container_registry import AzureContainerRegistry
  from wandb.sdk.launch.registry.elastic_container_registry import ElasticContainerRegistry
label_desc: Use image node_id 6 for calling a global function with example usage: mock_kubernetes_clients(monkeypatch) without return types