code: def model_config(
      task_name: str,
      model_name: str,
      tensor_parallel: int,
      replica_num: int,
      device_map: Union[str, dict],
      all_rank_output: bool,
  ):
      config = SimpleNamespace(
          model_name_or_path=model_name,
          task=task_name,
          tensor_parallel=tensor_parallel,
          replica_num=replica_num,
          device_map=device_map,
          all_rank_output=all_rank_output,
      )
      return config.__dict__
  
imports: import pytest
  import time
  import os
  import mii
  from types import SimpleNamespace
  from typing import Union
  from deepspeed.launcher.runner import DLTS_HOSTFILE
  import deepspeed.comm
label_desc: Use image node_id 14 for calling a global function with example usage: model_config(task_name, model_name, tensor_parallel, replica_num, device_map, all_rank_output) and returns: config