code: def test_finalze_metrics_reports_metrics_correctly(mocker):
      mocker.patch(
          "icevision.engines.lightning.lightning_model_adapter.LightningModelAdapter.log"
      )
  
      adapter = DummLightningModelAdapter(
          [MockMetric()], [("metric_a", "a")]
      )
      adapter.finalize_metrics()
  
      adapter.log.assert_any_call("a", 1, prog_bar=True)
      adapter.log.assert_any_call("MockMetric/metric_a", 1)
      adapter.log.assert_any_call("MockMetric/metric_b", 2)
  
file_path: icevision/tests/engines/lightning/test_lightning_model_adapter.py
imports: from icevision.engines.lightning import LightningModelAdapter
label_desc: Use image node_id 1 for calling a global function with example usage: test_finalze_metrics_reports_metrics_correctly(mocker) without return types