code: def test_run_kubernetes_job():
      active_run = mock.Mock()
      project_name = "mlflow-docker-example"
      image_tag = "image_tag"
      image_digest = "5e74a5a"
      command = ["python train.py --alpha 0.5 --l1-ratio 0.1"]
      env_vars = {"RUN_ID": "1"}
      kube_context = "docker-for-desktop"
      job_template = yaml.safe_load(
          "apiVersion: batch/v1\n"
          "kind: Job\n"
          "metadata:\n"
          "  name: pi-with-ttl\n"
          "  namespace: mlflow\n"
          "spec:\n"
          "  ttlSecondsAfterFinished: 100\n"
          "  template:\n"
          "    spec:\n"
          "      containers:\n"
          "      - name: pi\n"
          "        image: perl\n"
          "        command: ['perl',  '-Mbignum=bpi', '-wle']\n"
          "      restartPolicy: Never\n"
      )
      with mock.patch(
          "kubernetes.config.load_kube_config"
      ) as kube_config_mock:
          with mock.patch(
              "kubernetes.client.BatchV1Api.create_namespaced_job"
          ) as kube_api_mock:
              submitted_run_obj = kb.run_kubernetes_job(
                  project_name=project_name,
                  active_run=active_run,
                  image_tag=image_tag,
                  image_digest=image_digest,
                  command=command,
                  env_vars=env_vars,
                  job_template=job_template,
                  kube_context=kube_context,
              )
  
              assert (
                  submitted_run_obj._mlflow_run_id
                  == active_run.info.run_id
              )
              assert submitted_run_obj._job_name.startswith(
                  project_name
              )
              assert submitted_run_obj._job_namespace == "mlflow"
              assert kube_api_mock.call_count == 1
              args = kube_config_mock.call_args_list
              assert args[0][1]["context"] == kube_context
  
file_path: mlflow/tests/projects/test_kubernetes.py
imports: from unittest import mock
  import kubernetes
  import pytest
  import yaml
  from kubernetes.config.config_exception import ConfigException
  from mlflow.entities import RunStatus
  from mlflow.exceptions import ExecutionException
  from mlflow.projects import kubernetes
label_desc: Use image node_id 3 for calling a global function with example usage: test_run_kubernetes_job() without return types