code: def test_metricstracker_proto():
      tracker = metrics_tracking.MetricsTracker()
      tracker.register("score", direction="max")
      tracker.update("score", value=10, step=1)
      tracker.update("score", value=20, step=1)
      tracker.update("score", value=30, step=2)
  
      proto = tracker.to_proto()
      obs = proto.metrics["score"].observations
      assert obs[0].value == [10, 20]
      assert obs[0].step == 1
      assert obs[1].value == [30]
      assert obs[1].step == 2
      assert proto.metrics["score"].maximize
  
      new_tracker = metrics_tracking.MetricsTracker.from_proto(proto)
      assert new_tracker.metrics["score"].direction == "max"
      assert new_tracker.metrics["score"].get_history() == [
          metrics_tracking.MetricObservation([10, 20], 1),
          metrics_tracking.MetricObservation(30, 2),
      ]
  
imports: import random
  import numpy
  import pytest
  from keras_tuner.backend.keras import losses
  from keras_tuner.backend.keras import metrics
  from keras_tuner.engine import metrics_tracking
label_desc: Use image node_id 15 for calling a global function with example usage: test_metricstracker_proto() without return types