code: def main(self, offset, xs):
      # 2D: T v = in[offset_1];
      #     if (maxval < v) {
      #       maxval   = v;
      #       argmax_0 = x_0;
      #       argmax_1 = x_1;
      #     }
      w = conv_nd_kernel.Writer()
      w.write("T v = in[{}];".format(offset))
      w.write("if (maxval < v) {", "inc")
      w.write("maxval = v;")
      for argmax, x in six.moves.zip(self.argmaxs, xs):
          w.write("{} = {};".format(argmax, x))
      w.write("}", "dec")
      return w.get()
  
imports: import six
  from chainer.functions.pooling import pooling_nd_kernel
  from chainer.utils import conv_nd_kernel
label_desc: Use image node_id 4 for calling the MaxPoolingNDKernelForward obj's underlying member method code with example usage: obj.main(offset, xs) and returns: w