code: def setUpClass(cls) -> None:
      register_all_modules()
      head_cfg = dict(
          type="LinearReIDHead",
          num_fcs=1,
          in_channels=128,
          fc_channels=64,
          out_channels=32,
          num_classes=2,
          loss_cls=dict(
              type="mmpretrain.CrossEntropyLoss", loss_weight=1.0
          ),
          loss_triplet=dict(
              type="TripletLoss", margin=0.3, loss_weight=1.0
          ),
          norm_cfg=dict(type="BN1d"),
          act_cfg=dict(type="ReLU"),
      )
      cls.head = MODELS.build(head_cfg)
      cls.inputs = (torch.rand(4, 128), torch.rand(4, 128))
      cls.data_samples = [
          ReIDDataSample().set_gt_label(label) for label in (0, 0, 1, 1)
      ]
  
file_path: mmdetection/tests/test_models/test_reid/test_linear_reid_head.py
imports: from unittest import TestCase
  import torch
  from mmdet.registry import MODELS
  from mmdet.structures import ReIDDataSample
  from mmdet.utils import register_all_modules
label_desc: Use image node_id 1 for calling the TestLinearReIDHead obj's underlying member method code with example usage: obj.setUpClass(cls) without return types