code: def monitor_config(config_path: str) -> Generator[None, None, None]:
      with open(config_path) as f:
          prev_config = f.read()
  
      for changes in watch(os.path.dirname(config_path)):
          if not any((path == config_path) for _, path in changes):
              continue
  
          if not os.path.exists(config_path):
              _logger.warning(f"{config_path} deleted")
              continue
  
          with open(config_path) as f:
              config = f.read()
          if config == prev_config:
              continue
  
          try:
              _load_route_config(config_path)
          except Exception as e:
              _logger.warning("Invalid configuration: %s", e)
              continue
          else:
              prev_config = config
  
          yield
  
file_path: mlflow/mlflow/deployments/server/runner.py
imports: import logging
  import os
  import subprocess
  import sys
  from typing import Generator
  from watchfiles import watch
  from mlflow.deployments.server import app
  from mlflow.environment_variables import MLFLOW_DEPLOYMENTS_CONFIG
  from mlflow.gateway.config import _load_route_config
  from mlflow.gateway.utils import kill_child_processes
label_desc: Use image node_id 1 for calling a global function with example usage: monitor_config(config_path) without return types