code: def test_pooling_nd_kernel_forward_memo(self):
      ndim = self.ndim
      with testing.patch(
          "chainer.functions.pooling.pooling_nd_kernel."
          "PoolingNDKernelForward._generate",
          wraps=None,
      ) as m:
          pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)
          m.assert_called_once_with(ndim)
          pooling_nd_kernel.PoolingNDKernelForward.generate(ndim)
          # Check that the mocked _generate() function is called just once
          # because the result of generate() function is cached.
          m.assert_called_once_with(ndim)
  
file_path: chainer/tests/chainer_tests/functions_tests/pooling_tests/test_pooling_nd_kernel.py
imports: import unittest
  import chainer
  from chainer.functions.pooling import pooling_nd_kernel
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 2 for calling the TestPoolingNDKernelMemo obj's underlying member method code with example usage: obj.test_pooling_nd_kernel_forward_memo() without return types