code: def _configure_k8s_cluster(
      python: str, kubernetes_version: str, output: Output | None
  ) -> tuple[int, str]:
      cluster_name = get_kind_cluster_name(
          python=python, kubernetes_version=kubernetes_version
      )
      get_console(output=output).print(
          f"[info]Configuring {cluster_name} to be ready for Airflow deployment"
      )
      result = _recreate_namespaces(
          python=python,
          kubernetes_version=kubernetes_version,
          output=output,
      )
      if result.returncode == 0:
          result = _deploy_test_resources(
              python=python,
              kubernetes_version=kubernetes_version,
              output=output,
          )
      return result.returncode, f"Configure {cluster_name}"
  
imports: from __future__ import annotations
  import multiprocessing
  import os
  import re
  import shutil
  import sys
  import tempfile
  from copy import deepcopy
  from pathlib import Path
  from shlex import quote
  import click
  from airflow_breeze.commands.common_options import option_debug_resources, option_dry_run, option_include_success_outputs, option_parallelism, option_python, option_python_versions, option_run_in_parallel, option_skip_cleanup, option_verbose
  from airflow_breeze.commands.production_image_commands import run_build_production_image
  from airflow_breeze.global_constants import ALLOWED_EXECUTORS, ALLOWED_KUBERNETES_VERSIONS
  from airflow_breeze.params.build_prod_params import BuildProdParams
  from airflow_breeze.utils.ci_group import ci_group
  from airflow_breeze.utils.click_utils import BreezeGroup
  from airflow_breeze.utils.console import Output, get_console
  from airflow_breeze.utils.custom_param_types import CacheableChoice, CacheableDefault
  from airflow_breeze.utils.kubernetes_utils import CHART_PATH, K8S_CLUSTERS_PATH, SCRIPTS_CI_KUBERNETES_PATH, KubernetesPythonVersion, create_virtualenv, get_config_folder, get_k8s_env, get_kind_cluster_config_path, get_kind_cluster_name, get_kubeconfig_file, get_kubectl_cluster_name, get_kubernetes_python_combos, make_sure_kubernetes_tools_are_installed, print_cluster_urls, run_command_with_k8s_env, set_random_cluster_ports
  from airflow_breeze.utils.parallel import DockerBuildxProgressMatcher, GenericRegexpProgressMatcher, check_async_run_results, run_with_pool
  from airflow_breeze.utils.recording import generating_command_images
  from airflow_breeze.utils.run_utils import RunCommandResult, check_if_image_exists, run_command
label_desc: Use image node_id 18 for calling a global function with example usage: _configure_k8s_cluster(python, kubernetes_version, output) and returns: result,  str, cluster_name