class_docstr: Monitors kubernetes resources managed by the launch agent.
  
  Note: this class is forced to be a singleton in order to prevent multiple
  threads from being created that monitor the same kubernetes resources.
docstr: Create a new instance of the LaunchKubernetesMonitor.
  
  This method ensures that only one instance of the LaunchKubernetesMonitor
  is created. This is done to prevent multiple threads from being created
  that monitor the same kubernetes resources.
docstr_tok: ["Create","a","new","instance","of","the","LaunchKubernetesMonitor",".","This","method","ensures","that","only","one","instance","of","the","LaunchKubernetesMonitor","is","created",".","This","is","done","to","prevent","multiple","threads","from","being","created","that","monitor","the","same","kubernetes","resources","."]
code: def __new__(
      cls, *args: Any, **kwargs: Any
  ) -> "LaunchKubernetesMonitor":
      """Create a new instance of the LaunchKubernetesMonitor.
  
      This method ensures that only one instance of the LaunchKubernetesMonitor
      is created. This is done to prevent multiple threads from being created
      that monitor the same kubernetes resources.
      """
      if cls._instance is None:
          cls._instance = super().__new__(cls)
      return cls._instance
  
imports: import asyncio
  import logging
  import sys
  import traceback
  from typing import Any, Dict, List, Optional, Tuple, Union
  import kubernetes_asyncio
  import urllib3
  from kubernetes_asyncio import watch
  from kubernetes_asyncio.client import ApiException, BatchV1Api, CoreV1Api, CustomObjectsApi, V1PodStatus
  import wandb
  from wandb.sdk.launch.agent import LaunchAgent
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.runner.abstract import State, Status
  from wandb.sdk.launch.utils import get_kube_context_and_api_client
label_desc: Use image node_id 1 for calling the LaunchKubernetesMonitor obj's underlying member method code with example usage: obj.__new__(cls) and returns: cls