code: def test_get_losses(fridge_faster_rcnn_model, fridge_ds):
      model = fridge_faster_rcnn_model
      ds, _ = fridge_ds
  
      samples, losses_stats = faster_rcnn.interp.get_losses(model, ds)
      assert len(samples) == len(ds)
      assert set(losses_stats.keys()) == {
          "loss_box_reg",
          "loss_classifier",
          "loss_objectness",
          "loss_rpn_box_reg",
          "loss_total",
      }
      assert "loss_box_reg" in samples[0].losses.keys()
      assert "text" not in samples[0].losses.keys()
  
file_path: icevision/tests/models/torchvision_models/faster_rcnn/test_show_results.py
imports: import pytest
  from icevision.all import *
  from icevision.models.torchvision import faster_rcnn
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_losses(fridge_faster_rcnn_model, fridge_ds) without return types