code: def ref_max_pooling(
      x, kernel, stride, ignore_border, pad, channel_last
  ):
      if channel_last:
          t = refs.ChannelLastToFirstTranspose(x.ndim, len(kernel))
          x = t(x)
          y = ref_max_pooling(
              x, kernel, stride, ignore_border, pad, False
          )
          return t.inv(y)
      if len(kernel) == 3:
          y = ref_max_pooling_3d(x, kernel, stride, ignore_border, pad)
          return y
      y = ref_max_pooling_2d(x, kernel, stride, ignore_border, pad)
      return y
  
file_path: nnabla/python/test/function/test_max_pooling.py
imports: import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 3 for calling a global function with example usage: ref_max_pooling(x, kernel, stride, ignore_border, pad, channel_last) and returns: y, t, y