class_docstr: A thread-local borg class for tracking cuML global settings
  
  Because cuML makes use of internal context managers which try to minimize
  the number of conversions among various array types during internal calls,
  it is necessary to track certain settings globally. For instance, users can
  set a global output type, and cuML will ensure that the output is converted
  to the requested type *only* when a given API call returns to an external
  caller. Tracking when this happens requires globally-managed state.
  
  This class serves as a thread-local data store for any required global
  state. It is a thread-local borg, so updating an attribute on any instance
  of this class will update that attribute on *all* instances in the same
  thread. This additional layer of indirection on top of an ordinary
  `threading.local` object is to facilitate debugging of global settings
  changes. New global setting attributes can be added as properties to this
  object, and breakpoints or debugging statements can be added to a
  property's method to track when and how those properties change.
  
  In general, cuML developers should simply access `cuml.global_settings`
  rather than re-instantiating separate instances of this class in order to
  avoid the overhead of re-instantiation, but using a separate instance
  should not cause any logical errors.
class_docstr_tok: ["A","thread-local","borg","class","for","tracking","cuML","global","settings","Because","cuML","makes","use","of","internal","context","managers","which","try","to","minimize","the","number","of","conversions","among","various","array","types","during","internal","calls",",","it","is","necessary","to","track","certain","settings","globally",".","For","instance",",","users","can","set","a","global","output","type",",","and","cuML","will","ensure","that","the","output","is","converted","to","the","requested","type","*","only","*","when","a","given","API","call","returns","to","an","external","caller",".","Tracking","when","this","happens","requires","globally-managed","state",".","This","class","serves","as","a","thread-local","data","store","for","any","required","global","state",".","It","is","a","thread-local","borg",",","so","updating","an","attribute","on","any","instance","of","this","class","will","update","that","attribute","on","*","all","*","instances","in","the","same","thread",".","This","additional","layer","of","indirection","on","top","of","an","ordinary","`","threading.local","`","object","is","to","facilitate","debugging","of","global","settings","changes",".","New","global","setting","attributes","can","be","added","as","properties","to","this","object",",","and","breakpoints","or","debugging","statements","can","be","added","to","a","property","'s","method","to","track","when","and","how","those","properties","change",".","In","general",",","cuML","developers","should","simply","access","`","cuml.global_settings","`","rather","than","re-instantiating","separate","instances","of","this","class","in","order","to","avoid","the","overhead","of","re-instantiation",",","but","using","a","separate","instance","should","not","cause","any","logical","errors","."]
code: def memory_type(self, value):
      self._memory_type = value
  
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 5 for calling the GlobalSettings obj's underlying member method code with example usage: obj.memory_type(value) without return types