class_docstr: In memory storage for testing-only.
  
  Uses a priority queue under the hood to sort the models according to their
  score.
  
  Currently the only supported score is 'loss'.
docstr: Stores a model.
  
  Args:
    model_container: A `ModelContainer` instance.
code: def save_model(self, model_container: ModelContainer):
      """Stores a model.
  
      Args:
        model_container: A `ModelContainer` instance.
      """
      # We use a counter since heappush will compare on the second item in the
      # tuple in the case of a tie in the first item comparison. This is for the
      # off chance that two models have the same loss.
      heapq.heappush(self._model_containers, model_container)
  
file_path: adanet/adanet/experimental/storages/in_memory_storage.py
imports: import heapq
  from typing import List
  from adanet.experimental.storages.storage import ModelContainer
  from adanet.experimental.storages.storage import Storage
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the InMemoryStorage obj's underlying member method code with example usage: obj.save_model(model_container) without return types