code: def light_model_cls():
      class LightModel(
          models.ultralytics.yolov5.lightning.ModelAdapter
      ):
          def __init__(self, model, metrics=None):
              super(LightModel, self).__init__(model, metrics)
              self.was_finalize_metrics_called = False
  
          def configure_optimizers(self):
              return SGD(self.parameters(), lr=1e-3)
  
          def finalize_metrics(self):
              self.was_finalize_metrics_called = True
  
      return LightModel
  
imports: import pytest
  from icevision.all import *
  from icevision.models.ultralytics.yolov5.backbones import *
label_desc: Use image node_id 1 for calling a global function with example usage: light_model_cls() and returns: LightModel, SGD