code: def test_resnext_backbone():
      with pytest.raises(KeyError):
          # ResNeXt depth should be in [50, 101, 152]
          ResNeXt(depth=18)
  
      # Test ResNeXt with group 32, base_width 4
      model = ResNeXt(depth=50, groups=32, base_width=4)
      for m in model.modules():
          if is_block(m):
              assert m.conv2.groups == 32
      model.train()
  
      imgs = torch.randn(1, 3, 32, 32)
      feat = model(imgs)
      assert len(feat) == 4
      assert feat[0].shape == torch.Size([1, 256, 8, 8])
      assert feat[1].shape == torch.Size([1, 512, 4, 4])
      assert feat[2].shape == torch.Size([1, 1024, 2, 2])
      assert feat[3].shape == torch.Size([1, 2048, 1, 1])
  
imports: import pytest
  import torch
  from mmdet.models.backbones import ResNeXt
  from mmdet.models.backbones.resnext import Bottleneck
  from .utils import is_block
label_desc: Use image node_id 2 for calling a global function with example usage: test_resnext_backbone() without return types