code: def test_fastai_unet_training_step_returns_loss(camvid_ds, backbone):
      with torch.set_grad_enabled(True):
          train_ds, _ = camvid_ds
          train_dl = models.fastai.unet.train_dl(
              train_ds, batch_size=1, num_workers=0, shuffle=False
          )
          model = models.fastai.unet.model(
              num_classes=32,
              img_size=64,
              backbone=backbone(pretrained=False),
          )
  
          class LightModel(models.fastai.unet.lightning.ModelAdapter):
              def configure_optimizers(self):
                  return Adam(self.parameters(), lr=1e-4)
  
          for batch in train_dl:
              break
          expected_loss = random.randint(0, 1000)
          light_model = LightModel(model)
          light_model.compute_loss = lambda *args: expected_loss
  
          loss = light_model.training_step(batch, 0)
  
          assert loss == expected_loss
  
imports: import pytest
  from icevision.all import *
  from icevision.models.fastai.unet.backbones import *
label_desc: Use image node_id 2 for calling a global function with example usage: test_fastai_unet_training_step_returns_loss(camvid_ds, backbone) and returns: Adam