code: def check_model_id_in_replicas(
      handle: RayServeHandle, model_id: str
  ) -> bool:
      replica_scheduler = handle._get_or_create_router()[
          0
      ]._replica_scheduler
      replica_to_model_ids = {
          tag: replica.multiplexed_model_ids
          for tag, replica in replica_scheduler.curr_replicas.items()
      }
      msg = (
          f"Model ID '{model_id}' not found in replica_to_model_ids: "
          f"{replica_to_model_ids}"
      )
      assert any(
          model_id in rep for rep in replica_to_model_ids.values()
      ), msg
      return True
  
imports: import asyncio
  import os
  from typing import List
  import pytest
  import requests
  import ray
  from ray import serve
  from ray._private.test_utils import SignalActor, wait_for_condition
  from ray._private.utils import get_or_create_event_loop
  from ray.serve._private.constants import SERVE_MULTIPLEXED_MODEL_ID
  from ray.serve.context import _get_internal_replica_context
  from ray.serve.handle import RayServeHandle
  from ray.serve.multiplex import _ModelMultiplexWrapper
label_desc: Use image node_id 4 for calling a global function with example usage: check_model_id_in_replicas(handle, model_id) and returns: True