class_docstr: Launches PODS.
docstr: Creates custom object launcher(sparkapplications crd).
  
  :param kube_client: kubernetes client.
code: def __init__(
      self,
      name: str | None,
      namespace: str | None,
      kube_client: CoreV1Api,
      custom_obj_api: CustomObjectsApi,
      template_body: str | None = None,
  ):
      """
      Creates custom object launcher(sparkapplications crd).
  
      :param kube_client: kubernetes client.
      """
      super().__init__()
      self.name = name
      self.namespace = namespace
      self.template_body = template_body
      self.body: dict = self.get_body()
      self.kind = self.body["kind"]
      self.plural = f"{self.kind.lower()}s"
      if self.body.get("apiVersion"):
          self.api_group, self.api_version = self.body[
              "apiVersion"
          ].split("/")
      else:
          self.api_group = self.body["apiGroup"]
          self.api_version = self.body["version"]
      self._client = kube_client
      self.custom_obj_api = custom_obj_api
      self.spark_obj_spec: dict = {}
      self.pod_spec: k8s.V1Pod | None = None
  
imports: from __future__ import annotations
  import time
  from copy import deepcopy
  from datetime import datetime
  from functools import cached_property
  import tenacity
  from kubernetes.client import CoreV1Api, CustomObjectsApi, models
  from kubernetes.client.rest import ApiException
  from airflow.exceptions import AirflowException
  from airflow.providers.cncf.kubernetes.resource_convert.configmap import convert_configmap, convert_configmap_to_volume
  from airflow.providers.cncf.kubernetes.resource_convert.env_variable import convert_env_vars
  from airflow.providers.cncf.kubernetes.resource_convert.secret import convert_image_pull_secrets, convert_secret
  from airflow.providers.cncf.kubernetes.utils.pod_manager import PodManager
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 1 to create a new CustomObjectLauncher object from inherited base classes: LoggingMixin with example: obj = CustomObjectLauncher(name, namespace, kube_client, custom_obj_api, template_body)