code: def test_deconvolution_for_random_cases(self):
      # A few random cases will check if output shape computed from
      # the network is the same as the shape that we get after we
      # propagated input through the network.
      for test_id in range(30):
          width = random.randint(7, 20)
          height = random.randint(7, 20)
  
          fh = random.randint(1, 7)
          fw = random.randint(1, 7)
  
          pad = random.choice(
              [
                  "valid",
                  "same",
                  random.randint(0, 10),
                  (
                      random.randint(0, 10),
                      random.randint(0, 10),
                  ),
              ]
          )
          stride = random.choice(
              [
                  random.randint(1, 4),
                  (
                      random.randint(1, 4),
                      random.randint(1, 4),
                  ),
              ]
          )
  
          print("\n------------")
          print("Test case #{}".format(test_id))
          print("------------")
          print("Image shape: {}x{}".format(height, width))
          print("Filter shape: {}x{}".format(fh, fw))
          print("Padding: {}".format(pad))
          print("Stride: {}".format(stride))
  
          network = layers.join(
              layers.Input((height, width, 1)),
              layers.Convolution(
                  (fh, fw, 2), padding=pad, stride=stride
              ),
              layers.Deconvolution(
                  (fh, fw, 1), padding=pad, stride=stride
              ),
          )
  
          input_value = asfloat(np.random.random((1, height, width, 1)))
          actual_output = self.eval(network.output(input_value))
          self.assertEqual(
              actual_output.shape[1:], network.output_shape[1:]
          )
  
imports: import random
  from itertools import product
  from collections import namedtuple
  import numpy
  import tensorflow
  from neupy import layers
  from neupy.utils import asfloat, shape_to_tuple
  from neupy.layers.convolutions import conv_output_shape, deconv_output_shape
  from neupy.exceptions import LayerConnectionError
  from base import BaseTestCase
label_desc: Use image node_id 8 for calling the DeconvolutionTestCase obj's underlying member method code with example usage: obj.test_deconvolution_for_random_cases() without return types