code: def get_cmd(
      model_uri: str,
      port: Optional[int] = None,
      host: Optional[int] = None,
      timeout: Optional[int] = None,
      nworkers: Optional[int] = None,
  ) -> Tuple[str, Dict[str, str]]:
      local_uri = path_to_local_file_uri(model_uri)
      timeout = timeout or MLFLOW_SCORING_SERVER_REQUEST_TIMEOUT.get()
  
      # NB: Absolute windows paths do not work with mlflow apis, use file uri to ensure
      # platform compatibility.
      if not is_windows():
          args = [f"--timeout={timeout}"]
          if port and host:
              address = shlex.quote(f"{host}:{port}")
              args.append(f"-b {address}")
          elif host:
              args.append(f"-b {shlex.quote(host)}")
  
          if nworkers:
              args.append(f"-w {nworkers}")
  
          command = (
              f"gunicorn {' '.join(args)} ${{GUNICORN_CMD_ARGS}}"
              " -- mlflow.pyfunc.scoring_server.wsgi:app"
          )
      else:
          args = []
          if host:
              args.append(f"--host={shlex.quote(host)}")
  
          if port:
              args.append(f"--port={port}")
  
          command = (
              f"waitress-serve {' '.join(args)} "
              "--ident=mlflow mlflow.pyfunc.scoring_server.wsgi:app"
          )
  
      command_env = os.environ.copy()
      command_env[_SERVER_MODEL_PATH] = local_uri
  
      return command, command_env
  
imports: import inspect
  import json
  import logging
  import os
  import shlex
  import sys
  import traceback
  from typing import Dict, NamedTuple, Optional, Tuple
  import flask
  from mlflow.environment_variables import MLFLOW_SCORING_SERVER_REQUEST_TIMEOUT
  from mlflow.exceptions import MlflowException
  from mlflow.pyfunc.model import _log_warning_if_params_not_in_predict_signature
  from mlflow.types import ParamSchema, Schema
  from mlflow.utils import reraise
  from mlflow.utils.annotations import deprecated
  from mlflow.utils.file_utils import path_to_local_file_uri
  from mlflow.utils.os import is_windows
  from mlflow.utils.proto_json_utils import MlflowInvalidInputException, NumpyEncoder, _get_jsonable_obj, dataframe_from_parsed_json, parse_tf_serving_input
  from mlflow.version import VERSION
  from io import StringIO
  from mlflow.protos.databricks_pb2 import BAD_REQUEST, INVALID_PARAMETER_VALUE
  from mlflow.server.handlers import catch_mlflow_exception
label_desc: Use image node_id 14 for calling a global function with example usage: get_cmd(model_uri, port, host, timeout, nworkers) and returns: command,  command_env