code: def set_hf_deepspeed_config(hf_deepspeed_config_obj):
      # this is a special weakref global object to allow us to get to Deepspeed config from APIs
      # that don't have an easy way to get to the Deepspeed config outside of the Trainer domain.
      global _hf_deepspeed_config_weak_ref
      # will go away automatically when HfDeepSpeedConfig is destroyed (when TrainingArguments is destroyed)
      _hf_deepspeed_config_weak_ref = weakref.ref(
          hf_deepspeed_config_obj
      )
  
imports: import importlib.util
  import weakref
  from copy import deepcopy
  from functools import partialmethod
  from .dependency_versions_check import dep_version_check
  from .utils import is_accelerate_available, is_torch_available, logging
label_desc: Use image node_id 2 for calling a global function with example usage: set_hf_deepspeed_config(hf_deepspeed_config_obj) without return types