code: def test_backbone(backbone_factory, device, dtype):
      backbone = backbone_factory().to(device, dtype)
      assert hasattr(backbone, "out_channels")
      assert len(backbone.out_channels) == 3
  
      N, C, H, W = 2, 3, 224, 256
      imgs = torch.randn(N, C, H, W, device=device, dtype=dtype)
      fmaps = backbone(imgs)
  
      assert len(fmaps) == 3
      downscale = 8
      for fmap, ch in zip(fmaps, backbone.out_channels):
          assert fmap.shape == (N, ch, H // downscale, W // downscale)
          downscale *= 2
  
imports: from functools import partial
  import pytest
  import torch
  from kornia.contrib.models.rt_detr.architecture.hgnetv2 import PPHGNetV2
  from kornia.contrib.models.rt_detr.architecture.hybrid_encoder import HybridEncoder, RepVggBlock
  from kornia.contrib.models.rt_detr.architecture.resnet_d import ResNetD
  from kornia.contrib.models.rt_detr.architecture.rtdetr_head import RTDETRHead
  from kornia.contrib.models.rt_detr.model import RTDETR, RTDETRConfig
  from kornia.testing import BaseTester, assert_close
label_desc: Use image node_id 1 for calling a global function with example usage: test_backbone(backbone_factory, device, dtype) without return types