code: def _pool2d(in_size, out_size, np_data, np_op):
      out = np.zeros(out_size).astype(np_data.dtype)
      oh, ow = out_size
      for k in range(oh):
          k_start = _start_index(k, oh, in_size[0])
          k_end = _end_index(k, oh, in_size[0])
          k_sl = slice(k_start, k_end)
          for l in range(ow):
              l_start = _start_index(l, ow, in_size[1])
              l_end = _end_index(l, ow, in_size[1])
              l_sl = slice(l_start, l_end)
              out[k, l] = np_op(np_data[k_sl, l_sl])
      return out
  
file_path: tvm/python/tvm/topi/testing/adaptive_pool_python.py
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: _pool2d(in_size, out_size, np_data, np_op) and returns: out