code: def test_lightning_yolo_finalizes_metrics_on_validation_epoch_end(
      backbone, light_model_cls
  ):
      with torch.set_grad_enabled(False):
          model = models.ultralytics.yolov5.model(
              num_classes=5,
              img_size=384,
              backbone=backbone(pretrained=True),
          )
          metrics = [COCOMetric(metric_type=COCOMetricType.bbox)]
          light_model = light_model_cls(model, metrics=metrics)
  
          light_model.validation_epoch_end(None)
  
          assert light_model.was_finalize_metrics_called == True
  
imports: import pytest
  from icevision.all import *
  from icevision.models.ultralytics.yolov5.backbones import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_lightning_yolo_finalizes_metrics_on_validation_epoch_end(backbone, light_model_cls) without return types