code: def get_server_params(model_config: Union[str, Path]) -> Dict:
      server_config = read_json(SERVER_CONFIG_PATH)
      model_config = parse_config(model_config)
  
      server_params = server_config["common_defaults"]
  
      if check_nested_dict_keys(
          model_config, ["metadata", "server_utils"]
      ):
          model_tag = model_config["metadata"]["server_utils"]
          if check_nested_dict_keys(
              server_config, ["model_defaults", model_tag]
          ):
              model_defaults = server_config["model_defaults"][
                  model_tag
              ]
              for param_name in model_defaults.keys():
                  if model_defaults[param_name]:
                      server_params[param_name] = model_defaults[
                          param_name
                      ]
  
      server_params["model_endpoint"] = server_params.get(
          "model_endpoint", "/model"
      )
  
      arg_names = (
          server_params["model_args_names"]
          or model_config["chainer"]["in"]
      )
      if isinstance(arg_names, str):
          arg_names = [arg_names]
      server_params["model_args_names"] = arg_names
  
      return server_params
  
imports: import asyncio
  import os
  from collections import namedtuple
  from logging import getLogger
  from pathlib import Path
  from ssl import PROTOCOL_TLSv1_2
  from typing import Dict, List, Optional, Union
  import uvicorn
  from fastapi import Body, FastAPI, HTTPException
  from fastapi.utils import generate_operation_id_for_path
  from pydantic import BaseConfig, BaseModel
  from pydantic.fields import Field, ModelField
  from pydantic.main import ModelMetaclass
  from starlette.middleware.cors import CORSMiddleware
  from starlette.responses import RedirectResponse
  from deeppavlov.core.commands.infer import build_model
  from deeppavlov.core.commands.utils import parse_config
  from deeppavlov.core.common.chainer import Chainer
  from deeppavlov.core.common.file import read_json
  from deeppavlov.core.common.log import log_config
  from deeppavlov.core.common.paths import get_settings_path
  from deeppavlov.core.data.utils import check_nested_dict_keys, jsonify_data
  from deeppavlov.utils.connector import DialogLogger
  from deeppavlov.utils.server.metrics import metrics, PrometheusMiddleware
label_desc: Use image node_id 1 for calling a global function with example usage: get_server_params(model_config) and returns: server_params