code: def _run_server(
      file_store_path,
      registry_store_uri,
      default_artifact_root,
      serve_artifacts,
      artifacts_only,
      artifacts_destination,
      host,
      port,
      static_prefix=None,
      workers=None,
      gunicorn_opts=None,
      waitress_opts=None,
      expose_prometheus=None,
      app_name=None,
  ):
      """
      Run the MLflow server, wrapping it in gunicorn or waitress on windows
      :param static_prefix: If set, the index.html asset will be served from the path static_prefix.
                            If left None, the index.html asset will be served from the root path.
      :return: None
      """
      env_map = {}
      if file_store_path:
          env_map[BACKEND_STORE_URI_ENV_VAR] = file_store_path
      if registry_store_uri:
          env_map[REGISTRY_STORE_URI_ENV_VAR] = registry_store_uri
      if default_artifact_root:
          env_map[ARTIFACT_ROOT_ENV_VAR] = default_artifact_root
      if serve_artifacts:
          env_map[SERVE_ARTIFACTS_ENV_VAR] = "true"
      if artifacts_only:
          env_map[ARTIFACTS_ONLY_ENV_VAR] = "true"
      if artifacts_destination:
          env_map[ARTIFACTS_DESTINATION_ENV_VAR] = artifacts_destination
      if static_prefix:
          env_map[STATIC_PREFIX_ENV_VAR] = static_prefix
  
      if expose_prometheus:
          env_map[PROMETHEUS_EXPORTER_ENV_VAR] = expose_prometheus
  
      if app_name is None:
          app = f"{__name__}:app"
          is_factory = False
      else:
          app = _find_app(app_name)
          is_factory = _is_factory(app)
          # `waitress` doesn't support `()` syntax for factory functions.
          # Instead, we need to use the `--call` flag.
          app = f"{app}()" if (not is_windows() and is_factory) else app
  
      # TODO: eventually may want waitress on non-win32
      if sys.platform == "win32":
          full_command = _build_waitress_command(
              waitress_opts, host, port, app, is_factory
          )
      else:
          full_command = _build_gunicorn_command(
              gunicorn_opts, host, port, workers or 4, app
          )
      _exec_cmd(full_command, extra_env=env_map, capture_output=False)
  
imports: import importlib
  import importlib.metadata
  import os
  import shlex
  import sys
  import textwrap
  import types
  from flask import Flask, Response, send_from_directory
  from packaging.version import Version
  from mlflow.exceptions import MlflowException
  from mlflow.server import handlers
  from mlflow.server.handlers import STATIC_PREFIX_ENV_VAR, _add_static_prefix, create_promptlab_run_handler, gateway_proxy_handler, get_artifact_handler, get_metric_history_bulk_handler, get_model_version_artifact_handler, search_datasets_handler, upload_artifact_handler
  from mlflow.utils.os import is_windows
  from mlflow.utils.process import _exec_cmd
  from mlflow.version import VERSION
label_desc: Use image node_id 17 for calling a global function with example usage: _run_server(file_store_path, registry_store_uri, default_artifact_root, serve_artifacts, artifacts_only, artifacts_destination, host, port, static_prefix, workers, gunicorn_opts, waitress_opts, expose_prometheus, app_name) without return types