code: def test_resize(self):
      H, W = 30, 30
      input = np.random.rand(H, W).astype("float32") * 100
      box = [10, 10, 20, 20]
      output = self._simple_roialign(input, box, (5, 5), aligned=True)
  
      input2x = cv2.resize(
          input, (W // 2, H // 2), interpolation=cv2.INTER_LINEAR
      )
      box2x = [x / 2 for x in box]
      output2x = self._simple_roialign(
          input2x, box2x, (5, 5), aligned=True
      )
      diff = np.abs(output2x - output)
      self.assertTrue(diff.max() < 1e-4)
  
file_path: detectron2/tests/layers/test_roi_align.py
imports: import numpy
  import unittest
  from copy import copy
  import cv2
  import torch
  from fvcore.common.benchmark import benchmark
  from torch.nn import functional
  from detectron2.layers.roi_align import ROIAlign, roi_align
label_desc: Use image node_id 2 for calling the ROIAlignTest obj's underlying member method code with example usage: obj.test_resize() without return types