code: def test_out_of_order_insert(self):
      s = InMemoryMetricsStore()
      s.add_metrics_point({"m1": 1}, timestamp=1)
      s.add_metrics_point({"m1": 5}, timestamp=5)
      s.add_metrics_point({"m1": 3}, timestamp=3)
      s.add_metrics_point({"m1": 2}, timestamp=2)
      s.add_metrics_point({"m1": 4}, timestamp=4)
      assert s.window_average("m1", window_start_timestamp_s=0) == 3
      assert s.max("m1", window_start_timestamp_s=0) == 5
  
file_path: ray/python/ray/serve/tests/test_autoscaling_metrics.py
imports: import ray
  from ray import serve
  from ray._private.test_utils import SignalActor, wait_for_condition
  from ray.serve._private.autoscaling_metrics import InMemoryMetricsStore
  from ray.serve._private.common import DeploymentID, ReplicaState
label_desc: Use image node_id 2 for calling the TestInMemoryMetricsStore obj's underlying member method code with example usage: obj.test_out_of_order_insert() without return types