code: def get_zero_config(param_dict):
      if ZERO_OPTIMIZATION in param_dict:
          zero_config_dict = param_dict[ZERO_OPTIMIZATION]
          if isinstance(zero_config_dict, bool):
              zero_config_dict = read_zero_config_deprecated(param_dict)
      else:
          zero_config_dict = {}
      return DeepSpeedZeroConfig(**zero_config_dict)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/config.py
imports: from pydantic import Field, validator
  import sys
  from typing import Optional
  from enum import Enum
  from deepspeed.runtime.config_utils import get_scalar_param, pp_int, DeepSpeedConfigModel
  from deepspeed.utils import logger
  from .offload_config import DeepSpeedZeroOffloadParamConfig, DeepSpeedZeroOffloadOptimizerConfig, OffloadDeviceEnum
label_desc: Use image node_id 2 for calling a global function with example usage: get_zero_config(param_dict) and returns: DeepSpeedZeroConfig