code: def test_rename_loss_dict():
      prefix = "sup_"
      losses = {
          "cls_loss": torch.tensor(2.0),
          "reg_loss": torch.tensor(1.0),
      }
      sup_losses = rename_loss_dict(prefix, losses)
      for name in losses.keys():
          assert sup_losses[prefix + name] == losses[name]
  
file_path: mmdetection/tests/test_models/test_utils/test_misc.py
imports: import copy
  import pytest
  import torch
  from mmengine.structures import InstanceData
  from mmdet.models.utils import empty_instances, filter_gt_instances, rename_loss_dict, reweight_loss_dict, unpack_gt_instances
  from mmdet.testing import demo_mm_inputs
label_desc: Use image node_id 4 for calling a global function with example usage: test_rename_loss_dict() without return types