class_docstr: Spark kubernetes spec.
code: def set_attribute(self):
      self.env_vars = (
          convert_env_vars(self.env_vars) if self.env_vars else []
      )
      self.image_pull_secrets = (
          convert_image_pull_secrets(self.image_pull_secrets)
          if self.image_pull_secrets
          else []
      )
      if self.config_map_mounts:
          vols, vols_mounts = convert_configmap_to_volume(
              self.config_map_mounts
          )
          self.volumes.extend(vols)
          self.volume_mounts.extend(vols_mounts)
      if self.from_env_config_map:
          self.env_from.extend(
              [
                  convert_configmap(c_name)
                  for c_name in self.from_env_config_map
              ]
          )
      if self.from_env_secret:
          self.env_from.extend(
              [convert_secret(c) for c in self.from_env_secret]
          )
  
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 2 for calling the KubernetesSpec obj's underlying member method code with example usage: obj.set_attribute() without return types