code: def test_op_maxroipooling(
      input_map,
      input_rois,
      expected_fwd,
      expected_bkwd,
      device_id,
      precision,
  ):
      dt = PRECISION_TO_TYPE[precision]
  
      # AA == as numpy array
      conv_input = AA(input_map, dtype=dt)
      roi_input = AA(input_rois, dtype=dt)
      exp_fwd_value = AA(expected_fwd, dtype=dt)
      exp_bkwd_value = AA(expected_bkwd, dtype=dt)
  
      # adding batch, sequence and roi axis
      exp_fwd_value.shape = (1, 1) + exp_fwd_value.shape
      exp_bkwd_value.shape = (1,) + exp_bkwd_value.shape
  
      # I == define cntk input variables
      a = C.input_variable(
          shape=conv_input.shape,
          dtype=sanitize_dtype_cntk(precision),
          needs_gradient=True,
          name="a",
      )
  
      b = C.input_variable(
          shape=roi_input.shape,
          dtype=sanitize_dtype_cntk(precision),
          needs_gradient=False,
          name="b",
      )
  
      # adding batch and sequence axis
      conv_input.shape = (1,) + conv_input.shape
      roi_input.shape = (1,) + roi_input.shape
  
      from cntk import roipooling
  
      input_op = roipooling(a, b, C.MAX_POOLING, (3, 3), 1.0)
  
      forward_input = {a: conv_input, b: roi_input}
      expected_backward = {a: exp_bkwd_value}
  
      unittest_helper(
          input_op,
          forward_input,
          exp_fwd_value,
          expected_backward,
          device_id=device_id,
          precision=precision,
      )
  
imports: from __future__ import division
  import numpy
  import pytest
  import cntk
  from .ops_test_utils import unittest_helper, _test_unary_op, AA, precision, PRECISION_TO_TYPE, constant, cntk_device
  from cntk.ops import AVG_POOLING, MAX_POOLING, MAX_UNPOOLING
  from cntk.internal import sanitize_dtype_cntk
  from cntk.cntk_py import should_force_deterministic_algorithms
label_desc: Use image node_id 12 for calling a global function with example usage: test_op_maxroipooling(input_map, input_rois, expected_fwd, expected_bkwd, device_id, precision) without return types