code: def test_roi_pool(
      self, target, dev, ref_data, pooled_size, spatial_scale
  ):
      a_np, rois_np, b_np = ref_data
  
      a = te.placeholder(a_np.shape)
      rois = te.placeholder(rois_np.shape)
  
      with tvm.target.Target(target):
          b = topi.vision.rcnn.roi_pool_nchw(
              a,
              rois,
              pooled_size=pooled_size,
              spatial_scale=spatial_scale,
          )
          s_func = tvm.topi.testing.dispatch(target, _roi_pool_schedule)
          s = s_func(b)
  
      tvm_a = tvm.nd.array(a_np, dev)
      tvm_rois = tvm.nd.array(rois_np, dev)
      tvm_b = tvm.nd.array(
          np.zeros(b_np.shape, dtype=b.dtype), device=dev
      )
      f = tvm.build(s, [a, rois, b], target)
      f(tvm_a, tvm_rois, tvm_b)
      tvm.testing.assert_allclose(tvm_b.numpy(), b_np, rtol=1e-4)
  
imports: import math
  import sys
  import numpy
  import pytest
  import tvm
  import tvm.testing
  import tvm.topi.testing
  from tvm import te, topi
  from tvm.topi.vision import ssd, non_max_suppression, get_valid_counts
label_desc: Use image node_id 2 for calling the TestRoiPool obj's underlying member method code with example usage: obj.test_roi_pool(target, dev, ref_data, pooled_size, spatial_scale) without return types