class_docstr: Thread-local storage class with per-thread initialization of default
  values for global settings
class_docstr_tok: ["Thread-local","storage","class","with","per-thread","initialization","of","default","values","for","global","settings"]
code: def __init__(self):
      super().__init__()
      # If RAPIDS_NO_INITIALIZE is set, then we do lazy initialization
      if "RAPIDS_NO_INITIALIZE" not in os.environ:
          if is_cuda_available():
              default_device_type = DeviceType.device
              default_memory_type = MemoryType.device
          else:
              default_device_type = DeviceType.host
              default_memory_type = MemoryType.host
          self.shared_state = {
              "_output_type": None,
              "_device_type": default_device_type,
              "_memory_type": default_memory_type,
              "root_cm": None,
          }
      else:
          self.shared_state = {"_output_type": None, "root_cm": None}
  
file_path: cuml/python/cuml/internals/global_settings.py
imports: import os
  import threading
  from cuml.internals.available_devices import is_cuda_available
  from cuml.internals.device_type import DeviceType
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.safe_imports import cpu_only_import, gpu_only_import
label_desc: Use image node_id 1 to create a new _GlobalSettingsData object from inherited base classes: threading with example: obj = _GlobalSettingsData()