code: def test_mmdet_bbox_models_light_logs_losses_during_test_step(
      self,
      ds,
      model_type,
      pretrained,
      cfg_options,
      samples_source,
      request,
  ):
      with torch.set_grad_enabled(False):
          _, valid_dl, model = self.dls_model(
              ds,
              model_type,
              pretrained,
              cfg_options,
              samples_source,
              request,
          )
  
          class LitModel(model_type.lightning.ModelAdapter):
              def __init__(self, model, metrics=None):
                  super(LitModel, 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(LitModel, self).log(key, value, **args)
                  self.logs[key] = value
  
          expected_loss_key = "my_loss_key"
          model.train_step = lambda **args: {
              "log_vars": {expected_loss_key: random.randint(0, 10)}
          }
          light_model = LitModel(model)
          for batch in valid_dl:
              batch
              break
  
          light_model.test_step(batch, 0)
  
          assert list(light_model.logs.keys()) == [
              f"test_{expected_loss_key}"
          ]
  
file_path: icevision/tests/models/mmdet/test_model.py
imports: import pytest
  import random
  from icevision.all import *
label_desc: Use image node_id 10 for calling the TestBboxModels obj's underlying member method code with example usage: obj.test_mmdet_bbox_models_light_logs_losses_during_test_step(ds, model_type, pretrained, cfg_options, samples_source, request) and returns: Adam