code: def test_resnest_backbone():
      with pytest.raises(KeyError):
          # ResNeSt depth should be in [50, 101, 152, 200]
          ResNeSt(depth=18)
  
      # Test ResNeSt with radix 2, reduction_factor 4
      model = ResNeSt(
          depth=50,
          base_channels=4,
          radix=2,
          reduction_factor=4,
          out_indices=(0, 1, 2, 3),
      )
      model.train()
  
      imgs = torch.randn(2, 3, 32, 32)
      feat = model(imgs)
      assert len(feat) == 4
      assert feat[0].shape == torch.Size([2, 16, 8, 8])
      assert feat[1].shape == torch.Size([2, 32, 4, 4])
      assert feat[2].shape == torch.Size([2, 64, 2, 2])
      assert feat[3].shape == torch.Size([2, 128, 1, 1])
  
imports: import pytest
  import torch
  from mmdet.models.backbones import ResNeSt
  from mmdet.models.backbones.resnest import Bottleneck
label_desc: Use image node_id 2 for calling a global function with example usage: test_resnest_backbone() without return types