code: def _rotate_in_model(
      self, model, key, config_overrides=None, cache_key=None
  ):
      cache_key = self.model_cache_key(
          model, key=key, cache_key=cache_key
      )
      if cache_key not in self.loaded_models:
          if (
              self.max_models is not None
              and len(self.loaded_models) + 1 > self.max_models
          ) or not self._memory_for_one_more():
              self._close_oldest_model()
          config_overrides = config_overrides or {}
          merged_config = {**self.config, **config_overrides}
          out_model = BaseModel.load(model, key=key, **merged_config)
          self.model_cache[cache_key] = out_model
      else:
          out_model = self.model_cache[cache_key]
          self.loaded_models.remove(
              cache_key
          )  # put it back at the end of the queue
  
      self.loaded_models.append(cache_key)
      out_model._cached_predict = True
  
      return out_model
  
imports: from collections import OrderedDict
  import gc
  import logging
  import functools
  import psutil
  from finetune.target_models.sequence_labeling import SequenceLabeler
  import tensorflow
  from finetune.base import BaseModel
  from finetune.custom_ops import BytesInUse, BytesLimit, MaxBytesInUse
  from finetune.errors import FinetuneSchedulerError
label_desc: Use image node_id 5 for calling the Scheduler obj's underlying member method code with example usage: obj._rotate_in_model(model, key, config_overrides, cache_key) and returns: out_model