code: def test_valid_insize(self):
      N = self.N
      c = self.c
      ksize = self.ksize
      stride = self.stride
      pad = self.pad
      outs = self.outsize
      cover_all = self.cover_all
  
      # Make input.
      dims = tuple(
          conv.get_conv_outsize(out, k, s, p, cover_all=cover_all)
          for (out, k, s, p) in zip(outs, ksize, stride, pad)
      )
      x_shape = (N, c) + dims
      x_data = numpy.random.uniform(-1, 1, x_shape).astype(
          numpy.float32
      )
      x = chainer.Variable(x_data)
  
      # Compute unpooling.
      y = functions.unpooling_nd(
          x, ksize, stride, pad, outsize=outs, cover_all=cover_all
      )
  
      # Test output's value.
      y_expected = expected_unpooling_nd(
          x_data, outs, ksize, stride, pad
      )
      testing.assert_allclose(y_expected, y.data)
  
imports: import itertools
  import unittest
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer import functions
  from chainer import testing
  from chainer.utils import conv
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the TestUnpoolingNDOutsize obj's underlying member method code with example usage: obj.test_valid_insize() without return types