code: def test_basic_kubernetes(
      dag_maker,
      session,
      mock_create_pod: mock.Mock,
      mock_hook: mock.Mock,
  ) -> None:
      with dag_maker(session=session) as dag:
  
          @task.kubernetes(
              image="python:3.10-slim-buster",
              in_cluster=False,
              cluster_context="default",
              config_file="/tmp/fake_file",
          )
          def f():
              import random
  
              return [random.random() for _ in range(100)]
  
          f()
  
      dr = dag_maker.create_dagrun()
      (ti,) = dr.task_instances
      dag.get_task("f").execute(
          context=ti.get_template_context(session=session)
      )
      mock_hook.assert_called_once_with(
          conn_id="kubernetes_default",
          in_cluster=False,
          cluster_context="default",
          config_file="/tmp/fake_file",
      )
      assert mock_create_pod.call_count == 1
  
      containers = mock_create_pod.call_args.kwargs[
          "pod"
      ].spec.containers
      assert len(containers) == 1
      assert containers[0].command[0] == "bash"
      assert len(containers[0].args) == 0
      assert containers[0].env[0].name == "__PYTHON_SCRIPT"
      assert containers[0].env[0].value
      assert containers[0].env[1].name == "__PYTHON_INPUT"
  
      # Ensure we pass input through a b64 encoded env var
      decoded_input = pickle.loads(
          base64.b64decode(containers[0].env[1].value)
      )
      assert decoded_input == {"args": [], "kwargs": {}}
  
file_path: airflow/tests/providers/cncf/kubernetes/decorators/test_kubernetes.py
imports: from __future__ import annotations
  import base64
  import pickle
  from unittest import mock
  import pytest
  from airflow.decorators import setup, task, teardown
  from airflow.utils import timezone
label_desc: Use image node_id 7 for calling a global function with example usage: test_basic_kubernetes(dag_maker, session, mock_create_pod, mock_hook) and returns: unknown