code: def test_efficientdet_metrics(
      fridge_efficientdet_model,
      fridge_efficientdet_records,
      metric,
      expected_output,
      request,
  ):
      expected_output = request.getfixturevalue(expected_output)
      fridge_efficientdet_model.eval()
  
      batch, records = efficientdet.build_valid_batch(
          fridge_efficientdet_records
      )
  
      raw_preds = fridge_efficientdet_model(*batch)
  
      preds = efficientdet.convert_raw_predictions(
          batch=batch,
          raw_preds=raw_preds["detections"],
          records=fridge_efficientdet_records,
          detection_threshold=0.0,
      )
  
      metric.accumulate(preds)
  
      with CaptureStdout() as output:
          metric.finalize()
  
      assert output == expected_output
  
imports: import pytest
  from icevision.all import *
  from icevision.models.ross import efficientdet
label_desc: Use image node_id 3 for calling a global function with example usage: test_efficientdet_metrics(fridge_efficientdet_model, fridge_efficientdet_records, metric, expected_output, request) without return types