code: def light_model_cls():
      class LightModel(faster_rcnn.lightning.ModelAdapter):
          def __init__(self, model, metrics=None):
              super(LightModel, self).__init__(model, metrics)
              self.model = model
              self.logs = {}
  
          def configure_optimizers(self):
              return Adam(self.parameters(), lr=1e-4)
  
          def log(self, key, value, **args):
              super(LightModel, self).log(key, value, **args)
              self.logs[key] = value
  
      return LightModel
  
file_path: icevision/tests/models/torchvision_models/faster_rcnn/lightning/test_train.py
imports: import pytest
  import random
  from icevision.all import *
  from icevision.models.torchvision import faster_rcnn
label_desc: Use image node_id 1 for calling a global function with example usage: light_model_cls() and returns: LightModel, Adam