code: def test_hrmodule(block):
      # Test multiscale forward
      num_channles = (32, 64)
      in_channels = [c * block.expansion for c in num_channles]
      hrmodule = HRModule(
          num_branches=2,
          blocks=block,
          in_channels=in_channels,
          num_blocks=(4, 4),
          num_channels=num_channles,
      )
  
      feats = [
          torch.randn(1, in_channels[0], 64, 64),
          torch.randn(1, in_channels[1], 32, 32),
      ]
      feats = hrmodule(feats)
  
      assert len(feats) == 2
      assert feats[0].shape == torch.Size([1, in_channels[0], 64, 64])
      assert feats[1].shape == torch.Size([1, in_channels[1], 32, 32])
  
      # Test single scale forward
      num_channles = (32, 64)
      in_channels = [c * block.expansion for c in num_channles]
      hrmodule = HRModule(
          num_branches=2,
          blocks=block,
          in_channels=in_channels,
          num_blocks=(4, 4),
          num_channels=num_channles,
          multiscale_output=False,
      )
  
      feats = [
          torch.randn(1, in_channels[0], 64, 64),
          torch.randn(1, in_channels[1], 32, 32),
      ]
      feats = hrmodule(feats)
  
      assert len(feats) == 1
      assert feats[0].shape == torch.Size([1, in_channels[0], 64, 64])
  
imports: import pytest
  import torch
  from mmdet.models.backbones.hrnet import HRModule, HRNet
  from mmdet.models.backbones.resnet import BasicBlock, Bottleneck
label_desc: Use image node_id 1 for calling a global function with example usage: test_hrmodule(block) without return types