code: def test_pooling_with_index(
      self,
      stride,
      pad,
      kernel,
      size,
      input_channels,
      batch_size,
      gc,
      dc,
  ):
      assume(pad < kernel)
      op = core.CreateOperator(
          "MaxPoolWithIndex",
          ["X"],
          ["Y", "Y_index"],
          stride=stride,
          kernel=kernel,
          pad=pad,
          order="NCHW",
          deterministic=1,
      )
      X = np.random.rand(batch_size, size, size, input_channels).astype(
          np.float32
      )
  
      # transpose due to order = NCHW
      X = utils.NHWC2NCHW(X)
  
      self.assertDeviceChecks(dc, op, [X], [0])
  
imports: import numpy
  from hypothesis import assume, given, settings
  import hypothesis.strategies
  import os
  import unittest
  from caffe2.python import core, utils, workspace
  import caffe2.python.hip_test_util
  import caffe2.python.hypothesis_test_util
label_desc: Use image node_id 6 for calling the TestPooling obj's underlying member method code with example usage: obj.test_pooling_with_index(stride, pad, kernel, size, input_channels, batch_size, gc, dc) without return types