code: def _get_comp_attribs(self):
      num_rois = 32
      x = np.random.randint(4, 224, (num_rois, 1))
      y = np.random.randint(4, 224, (num_rois, 1))
      h = 4 * np.ones((num_rois, 1))
      w = 4 * np.ones((num_rois, 1))
      angle = (
          (np.random.random_sample((num_rois, 1)) * 2 - 1) * np.pi / 2
      )
      cos, sin = np.cos(angle), np.sin(angle)
      comp_labels = np.random.randint(1, 3, (num_rois, 1))
      num_rois = num_rois * np.ones((num_rois, 1))
      comp_attribs = np.hstack(
          [num_rois, x, y, h, w, cos, sin, comp_labels]
      )
      gt_comp_attribs = np.expand_dims(
          comp_attribs.astype(np.float32), axis=0
      )
      return gt_comp_attribs
  
file_path: mmocr/tests/test_models/test_textdet/test_detectors/test_drrg.py
imports: import copy
  import unittest
  from os.path import dirname, exists, join
  from unittest import mock
  import numpy
  import torch
  from mmengine.config import Config, ConfigDict
  from mmengine.registry import init_default_scope
  from mmocr.registry import MODELS
  from mmocr.testing.data import create_dummy_textdet_inputs
label_desc: Use image node_id 2 for calling the TestDRRG obj's underlying member method code with example usage: obj._get_comp_attribs() and returns: gt_comp_attribs