code: def support_legacy_api(
      task,
      model,
      deployment_type=DeploymentType.LOCAL,
      model_path="",
      enable_deepspeed=True,
      enable_zero=False,
      ds_config=None,
      mii_config=None,
      version=1,
  ):
      if ds_config is None:
          ds_config = {}
      if mii_config is None:
          mii_config = {}
  
      model_config = {
          "task": task,
          "model": model,
          "model_path": model_path,
          "enable_deepspeed": enable_deepspeed,
          "enable_zero": enable_zero,
          "ds_config": ds_config,
      }
      # TODO do this in a single for loop
      for key, val in mii_config.items():
          if key not in MIIConfig.__dict__["__fields__"]:
              model_config[key] = val
      mii_config = {
          k: v
          for k, v in mii_config.items()
          if k in MIIConfig.__dict__["__fields__"]
      }
      mii_config["version"] = version
      mii_config["deployment_type"] = deployment_type
  
      return model_config, mii_config
  
file_path: deepspeed-mii/mii/legacy/deployment.py
imports: import os
  import mii.legacy
  from .logging import logger
  from .models.score import create_score_file
  from .models import load_models
  from .config import MIIConfig, DeploymentType
label_desc: Use image node_id 1 for calling a global function with example usage: support_legacy_api(task, model, deployment_type, model_path, enable_deepspeed, enable_zero, ds_config, mii_config, version) and returns: model_config,  mii_config