code: def test_multiplexed_replica_info(serve_instance):
      """Test MultiplexedReplicaInfo is passed to the controller & router"""
  
      @serve.deployment
      class MyModel:
          @serve.multiplexed(max_num_models_per_replica=2)
          async def get_model(self, model_id: str):
              return
  
          async def __call__(self, model_id: str):
              _ = await self.get_model(model_id)
              return _get_internal_replica_context().replica_tag
  
      handle = serve.run(MyModel.bind())
      replica_tag = handle.remote("model1").result()
  
      def check_replica_information(
          model_ids: List[str],
      ):
          replica_scheduler = handle._get_or_create_router()[
              0
          ]._replica_scheduler
          for replica in replica_scheduler.curr_replicas.values():
              if (
                  replica.replica_id != replica_tag
                  or model_ids != replica.multiplexed_model_ids
              ):
                  return False
  
          return True
  
      wait_for_condition(
          check_replica_information,
          model_ids={
              "model1",
          },
      )
  
      handle.remote("model2").result()
      wait_for_condition(
          check_replica_information,
          model_ids={
              "model1",
              "model2",
          },
      )
  
      # LRU remove the model1
      handle.remote("model3").result()
      wait_for_condition(
          check_replica_information,
          model_ids={
              "model2",
              "model3",
          },
      )
  
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 3 for calling a global function with example usage: test_multiplexed_replica_info(serve_instance) and returns: True, _get_internal_replica_context, False