code: def test_linearize_metrics():
      entries = [
          ScalarMetricLogEntry(
              "training.loss", 10, datetime.datetime.utcnow(), 100
          ),
          ScalarMetricLogEntry(
              "training.accuracy", 5, datetime.datetime.utcnow(), 50
          ),
          ScalarMetricLogEntry(
              "training.loss", 20, datetime.datetime.utcnow(), 200
          ),
          ScalarMetricLogEntry(
              "training.accuracy", 10, datetime.datetime.utcnow(), 100
          ),
          ScalarMetricLogEntry(
              "training.accuracy", 15, datetime.datetime.utcnow(), 150
          ),
          ScalarMetricLogEntry(
              "training.accuracy", 30, datetime.datetime.utcnow(), 300
          ),
      ]
      linearized = linearize_metrics(entries)
      assert type(linearized) == dict
      assert len(linearized.keys()) == 2
      assert "training.loss" in linearized
      assert "training.accuracy" in linearized
      assert len(linearized["training.loss"]["steps"]) == 2
      assert len(linearized["training.loss"]["values"]) == 2
      assert len(linearized["training.loss"]["timestamps"]) == 2
      assert len(linearized["training.accuracy"]["steps"]) == 4
      assert len(linearized["training.accuracy"]["values"]) == 4
      assert len(linearized["training.accuracy"]["timestamps"]) == 4
      assert linearized["training.accuracy"]["steps"] == [5, 10, 15, 30]
      assert linearized["training.accuracy"]["values"] == [
          50,
          100,
          150,
          300,
      ]
      assert linearized["training.loss"]["steps"] == [10, 20]
      assert linearized["training.loss"]["values"] == [100, 200]
  
file_path: sacred/tests/test_metrics_logger.py
imports: import datetime
  import pytest
  from sacred import Experiment
  from sacred.metrics_logger import ScalarMetricLogEntry, linearize_metrics
label_desc: Use image node_id 6 for calling a global function with example usage: test_linearize_metrics() without return types