code: def test_guided_anchor_head_predict_by_feat(self):
      s = 256
      img_metas = [
          {
              "img_shape": (s, s),
              "pad_shape": (s, s),
              "scale_factor": (1, 1),
          }
      ]
      guided_anchor_head = GuidedAnchorHead(**guided_anchor_head_config)
  
      feats = (
          torch.rand(1, 4, s // stride[1], s // stride[0])
          for stride in guided_anchor_head.square_anchor_generator.strides
      )
      outs = guided_anchor_head(feats)
  
      guided_anchor_head.predict_by_feat(
          *outs, batch_img_metas=img_metas, rescale=True
      )
  
file_path: mmdetection/tests/test_models/test_dense_heads/test_guided_anchor_head.py
imports: from unittest import TestCase
  import torch
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from mmdet.models.dense_heads import GuidedAnchorHead
label_desc: Use image node_id 2 for calling the TestGuidedAnchorHead obj's underlying member method code with example usage: obj.test_guided_anchor_head_predict_by_feat() without return types