class_docstr: A wrapper class that wraps the model load function and
  provides the LRU caching functionality.
  
  The model multiplexer is a wrapper class that wraps the model load function
  and provides the LRU caching functionality, and the model load function should
  be a coroutine function that takes the model ID as the first argument and
  returns the user-constructed model object.
  The model multiplexer will also ensure that the number of models on the current
  replica does not exceed the specified limit.
  The model will be unloaded in the LRU order, the model multiplexer will call the
  model's __del__ attribute if it exists to clean up the model resources eagerly.
class_docstr_tok: ["A","wrapper","class","that","wraps","the","model","load","function","and","provides","the","LRU","caching","functionality",".","The","model","multiplexer","is","a","wrapper","class","that","wraps","the","model","load","function","and","provides","the","LRU","caching","functionality",",","and","the","model","load","function","should","be","a","coroutine","function","that","takes","the","model","ID","as","the","first","argument","and","returns","the","user-constructed","model","object",".","The","model","multiplexer","will","also","ensure","that","the","number","of","models","on","the","current","replica","does","not","exceed","the","specified","limit",".","The","model","will","be","unloaded","in","the","LRU","order",",","the","model","multiplexer","will","call","the","model","'s","__del__","attribute","if","it","exists","to","clean","up","the","model","resources","eagerly","."]
docstr: Get the model IDs of the loaded models & loading models in the replica.
  This is to push the model id information early to the controller, so that
  requests can be routed to the replica.
docstr_tok: ["Get","the","model","IDs","of","the","loaded","models","&","loading","models","in","the","replica",".","This","is","to","push","the","model","id","information","early","to","the","controller",",","so","that","requests","can","be","routed","to","the","replica","."]
code: def _get_loading_and_loaded_model_ids(self) -> List[str]:
      """Get the model IDs of the loaded models & loading models in the replica.
      This is to push the model id information early to the controller, so that
      requests can be routed to the replica.
      """
      models_list = set(self.models.keys())
      models_list.update(self._model_load_tasks)
      return list(models_list)
  
file_path: ray/python/ray/serve/multiplex.py
imports: import asyncio
  import inspect
  import logging
  import time
  from collections import OrderedDict
  from typing import Any, Callable, List, Set
  from ray.serve import metrics
  from ray.serve._private.common import DeploymentID, MultiplexedReplicaInfo
  from ray.serve._private.constants import DEFAULT_LATENCY_BUCKET_MS, PUSH_MULTIPLEXED_MODEL_IDS_INTERVAL_S, SERVE_LOGGER_NAME
  from ray.serve._private.usage import ServeUsageTag
  from ray.serve._private.utils import MetricsPusher
  from ray.serve.context import _get_global_client, _get_internal_replica_context
label_desc: Use image node_id 2 for calling the _ModelMultiplexWrapper obj's underlying member method code with example usage: obj._get_loading_and_loaded_model_ids() and returns: list