code: def test_im2col_nd_cpu_parameter_ranks(self):
      # Invalid ksize length.
      with self.assertRaises(AssertionError):
          conv_nd.im2col_nd_cpu(self.img, (2,), self.stride, self.pad)
  
      # Invalid stride length.
      with self.assertRaises(AssertionError):
          conv_nd.im2col_nd_cpu(self.img, self.ksize, (1,), self.pad)
  
      # Invalid pad length.
      with self.assertRaises(AssertionError):
          conv_nd.im2col_nd_cpu(self.img, self.ksize, self.stride, (0,))
  
imports: import itertools
  import unittest
  import numpy
  from six import moves
  from chainer.backends import cuda
  from chainer import testing
  from chainer.testing import attr
  from chainer.utils import conv_nd
label_desc: Use image node_id 2 for calling the TestIm2ColNDParameterRanks obj's underlying member method code with example usage: obj.test_im2col_nd_cpu_parameter_ranks() without return types