code: def test_works_like_conv2d(self):
      x = tf.constant(
          [
              [
                  [[2], [1], [2], [0], [1]],
                  [[1], [3], [2], [2], [3]],
                  [[1], [1], [3], [3], [0]],
                  [[2], [2], [0], [1], [1]],
                  [[0], [0], [3], [1], [2]],
              ]
          ],
          tf.float32,
      )  # shape=[1, 5, 5, 1]
      x = tf.concat([x, x], axis=-1)
      k = tf.constant(
          [
              [[[2, 0.1]], [[3, 0.2]]],
              [[[0, 0.3]], [[1, 0.4]]],
          ],
          tf.float32,
      )  # shape=[2, 2, 1, 2]
      k = tf.concat([k, k], axis=-2)
      strides = [1, 2]
      im2row_x = convolution_util.im2row(
          x,
          block_shape=ps.shape(k)[:2],
          slice_step=strides,
          padding="VALID",
      )
      y_expected = tf.nn.conv2d(x, k, strides=strides, padding="VALID")
      y_actual = tf.matmul(
          im2row_x, tf.reshape(k, shape=[-1, k.shape[-1]])
      )
      [y_expected_, y_actual_] = self.evaluate([y_expected, y_actual])
      self.assertAllClose(y_expected_, y_actual_, rtol=1e-5, atol=0)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.nn.util import convolution_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 1 for calling the Im2RowTest obj's underlying member method code with example usage: obj.test_works_like_conv2d() without return types