code: def unpooling_2d(
      x, ksize, stride=None, pad=0, outsize=None, cover_all=True
  ):
      """Inverse operation of pooling for 2d array.
  
      This function acts similarly to
      :class:`~functions.connection.deconvolution_2d.Deconvolution2DFunction`,
      but it spreads input 2d array's value without any parameter instead of
      computing the inner products.
  
      Args:
          x (~chainer.Variable): Input variable.
          ksize (int or pair of ints): Size of pooling window. ``ksize=k`` and
              ``ksize=(k, k)`` are equivalent.
          stride (int, pair of ints or None): Stride of pooling applications.
              ``stride=s`` and ``stride=(s, s)`` are equivalent. If ``None`` is
              specified, then it uses same stride as the pooling window size.
          pad (int or pair of ints): Spatial padding width for the input array.
              ``pad=p`` and ``pad=(p, p)`` are equivalent.
          outsize (None or pair of ints): Expected output size (height, width)
              of array after the operation.  If ``None``, the size
              (height or width) is estimated from the size of input array
              in first batch with
              :func:`~chainer.utils.conv.get_deconv_outsize`.
              If outsize is not ``None``, the result of outsize applied to
              :func:`~chainer.utils.conv.get_conv_outsize` must be equal to
              the shape of the 2d array in the input batch ``x``.
          cover_all (bool): If ``True``, the output size may be smaller than
              the size if ``cover_all`` is ``False``. This flag serves to
              align behavior to the pooling functions which can cover all
              input locations, see :func:`~chainer.functions.max_pooling_2d`
              and :func:`~chainer.functions.convolution_2d`.
  
  
      Returns:
          ~chainer.Variable: Output variable.
  
      """
      return Unpooling2D(ksize, stride, pad, outsize, cover_all).apply(
          (x,)
      )[0]
  
imports: import numpy
  import numpy.lib.stride_tricks
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.functions.pooling import pooling_2d
  from chainer.utils import conv
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: unpooling_2d(x, ksize, stride, pad, outsize, cover_all) and returns: Unpooling2D