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 io
  import json
  import weakref
  from copy import deepcopy
  from functools import partialmethod
  from .utils.versions import require_version
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.log import logger
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