code: def _compile_max_x(self):
      def aux(max_val, out_val, stride_val, pad_val, ksize_vals):
          head = ksize_vals[0]
          tail = ksize_vals[1:]
          if tail:
              command = (
                  "int {} = max(0, {} * {} - {} + index / ({}) % {});"
              )
              return command.format(
                  max_val,
                  out_val,
                  stride_val,
                  pad_val,
                  conv_nd_kernel.mulexp(tail),
                  head,
              )
          else:
              return (
                  "int {} = max(0, {} * {} - {} + index % {});".format(
                      max_val, out_val, stride_val, pad_val, head
                  )
              )
  
      max_vals = conv_nd_kernel.vars("max", self.ndim)
      out_vals = conv_nd_kernel.vars("out_x", self.ndim)
      stride_vals = conv_nd_kernel.vars("s", self.ndim)
      pad_vals = conv_nd_kernel.vars("p", self.ndim)
      ksize_vals = conv_nd_kernel.vars("k", self.ndim)
  
      offset_ks_decls = conv_nd_kernel.map_(
          aux,
          max_vals,
          out_vals,
          stride_vals,
          pad_vals,
          conv_nd_kernel.succ_sublists(ksize_vals),
      )
      return offset_ks_decls
  
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 MaxPoolingNDKernelForwardWithIndexes obj's underlying member method code with example usage: obj._compile_max_x() and returns: offset_ks_decls, command, str