code: def test_im2col_nd_kernel_memo(self):
      ndim = self.ndim
      with mock.patch(
          "chainer.utils.conv_nd_kernel.Im2colNDKernel._generate"
      ) as m:
          conv_nd_kernel.Im2colNDKernel.generate(ndim)
          m.assert_called_once_with(ndim)
          conv_nd_kernel.Im2colNDKernel.generate(ndim)
          m.assert_called_once_with(ndim)
  
file_path: chainer/tests/chainer_tests/utils_tests/test_conv_nd_kernel.py
imports: import unittest
  import mock
  import chainer
  from chainer import testing
  from chainer.testing import attr
  from chainer.utils import conv_nd_kernel
label_desc: Use image node_id 2 for calling the TestIm2colNDKernelMemo obj's underlying member method code with example usage: obj.test_im2col_nd_kernel_memo() without return types