code: def test_log_metrics(queue_observer):
      queue_observer.started_event()
      first = ("a", [1])
      second = ("b", [2])
      queue_observer.log_metrics(OrderedDict([first, second]), "info")
      queue_observer.join()
      assert (
          queue_observer._covered_observer.method_calls[1][0]
          == "log_metrics"
      )
      assert queue_observer._covered_observer.method_calls[1][1] == (
          first[0],
          first[1],
          "info",
      )
      assert queue_observer._covered_observer.method_calls[1][2] == {}
      assert (
          queue_observer._covered_observer.method_calls[2][0]
          == "log_metrics"
      )
      assert queue_observer._covered_observer.method_calls[2][1] == (
          second[0],
          second[1],
          "info",
      )
      assert queue_observer._covered_observer.method_calls[2][2] == {}
  
file_path: sacred/tests/test_observers/test_queue_observer.py
imports: from collections import OrderedDict
  from sacred.observers.queue import QueueObserver
  from sacred import Experiment
  import mock
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: test_log_metrics(queue_observer) without return types