code: def test_metrichistory_proto():
      tracker = metrics_tracking.MetricHistory("max")
      tracker.update(5, step=3)
      tracker.update(10, step=4)
  
      proto = tracker.to_proto()
      assert proto.maximize
      assert proto.observations[0].value == [5]
      assert proto.observations[0].step == 3
      assert proto.observations[1].value == [10]
      assert proto.observations[1].step == 4
  
      new_tracker = metrics_tracking.MetricHistory.from_proto(proto)
      assert new_tracker.direction == "max"
      assert new_tracker.get_history() == [
          metrics_tracking.MetricObservation(5, 3),
          metrics_tracking.MetricObservation(10, 4),
      ]
  
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 14 for calling a global function with example usage: test_metrichistory_proto() without return types