class_docstr: Factory class for creating kubernetes API client.
class_docstr_tok: ["Factory","class","for","creating","kubernetes","API","client","."]
docstr: Load the kubernetes client config.
  
  Depending on the environment (whether it is inside the running kubernetes
  cluster or remote host), different location will be searched for the config
  file. The loaded config will be used as a default value for the clients this
  factory is creating.
  
  If config is already loaded, it is a no-op.
  
  Raises:
    kubernetes.config.ConfigException: If fails to locate configuration in
        current environment.
docstr_tok: ["Load","the","kubernetes","client","config",".","Depending","on","the","environment","(","whether","it","is","inside","the","running","kubernetes","cluster","or","remote","host",")",",","different","location","will","be","searched","for","the","config","file",".","The","loaded","config","will","be","used","as","a","default","value","for","the","clients","this","factory","is","creating",".","If","config","is","already","loaded",",","it","is","a","no-op",".","Raises",":","kubernetes.config.ConfigException",":","If","fails","to","locate","configuration","in","current","environment","."]
code: def _LoadConfig(self) -> None:  # pylint: disable=invalid-name
      """Load the kubernetes client config.
  
      Depending on the environment (whether it is inside the running kubernetes
      cluster or remote host), different location will be searched for the config
      file. The loaded config will be used as a default value for the clients this
      factory is creating.
  
      If config is already loaded, it is a no-op.
  
      Raises:
        kubernetes.config.ConfigException: If fails to locate configuration in
            current environment.
      """
      try:
          # If this code is running inside Kubernetes Pod, service account admission
          # controller [1] sets volume mounts in which the service account tokens
          # and certificates exists, and it can be loaded using
          # `load_incluster_config()`.
          #
          # [1]
          # https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#service-account-admission-controller
          self._inside_cluster = True
          k8s_config.load_incluster_config()
      except k8s_config.ConfigException:
          # If loading incluster config fails, it means we're not running the code
          # inside Kubernetes cluster. We try to load ~/.kube/config file, or the
          # filename from the KUBECONFIG environment variable.
          # It will raise kubernetes.config.ConfigException if no kube config file
          # is found.
          self._inside_cluster = False
          k8s_config.load_kube_config()
  
      self._config_loaded = True
  
imports: import datetime
  import enum
  import os
  import re
  import time
  from typing import Callable, Dict, List, Optional
  from absl import logging
  from kubernetes import client
  from kubernetes import config
label_desc: Use image node_id 3 for calling the _KubernetesClientFactory obj's underlying member method code with example usage: obj._LoadConfig() without return types