code: def test_op_pooling_geometry(
      input_size,
      pooling_window,
      strides,
      padding,
      result,
      use_input_shape_with_inferred_dimension,
      device_id,
      precision,
  ):
      dt = PRECISION_TO_TYPE[precision]
  
      # fill input operand with a sequence 1,2,3,... til total size and then
      # resize to input_size
      total_size = np.prod(input_size)
      x = np.arange(total_size, dtype=dt)
      input_operand = x.reshape(input_size)
  
      pool_input_shape = input_operand.shape[1:]
      if use_input_shape_with_inferred_dimension:
          pool_input_shape = tuple(-1 for x in pool_input_shape)
  
      a = C.input_variable(
          shape=pool_input_shape,
          dtype=sanitize_dtype_cntk(precision),
          needs_gradient=False,
          name="a",
      )
  
      from cntk import pooling
  
      input_op = pooling(
          a, MAX_POOLING, pooling_window, strides, auto_padding=padding
      )
  
      forward_input = {a: input_operand}
      expected_forward = AA(result)
  
      unittest_helper(
          input_op,
          forward_input,
          expected_forward,
          None,
          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 5 for calling a global function with example usage: test_op_pooling_geometry(input_size, pooling_window, strides, padding, result, use_input_shape_with_inferred_dimension, device_id, precision) without return types