code: def test_works_like_conv2d(
      self,
      input_shape,
      filter_shape,
      channels_out,
      strides,
      padding,
      dilations,
  ):
      x, k = _make_input_and_kernel(
          self.make_input,
          input_batch_shape=[],
          input_shape=input_shape,
          # Use singleton kernel_batch_shape to bypass the short circuit to tf.nn.
          kernel_batch_shape=[1],
          filter_shape=filter_shape,
          channels_out=channels_out,
          dtype=self.dtype,
      )
  
      tf_kernel = tf.reshape(
          k, shape=(filter_shape) + (input_shape[-1], channels_out)
      )
      y_expected = tf.nn.conv2d(
          x,
          tf_kernel,
          strides=strides,
          padding=padding,
          dilations=dilations,
      )
  
      conv_fn = convolution_util.make_convolution_fn(
          self.make_integer_input(filter_shape),
          rank=2,
          strides=self.make_integer_input(strides),
          padding=padding,
          dilations=self.make_integer_input(dilations),
          validate_args=True,
      )
  
      with tf.GradientTape() as tape:
          tape.watch([x, k])
          y_actual = conv_fn(x, k)
      grad = tape.gradient(y_actual, [x, k])
      self.assertAllNotNone(grad)
  
      [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 _BatchedConvTest obj's underlying member method code with example usage: obj.test_works_like_conv2d(input_shape, filter_shape, channels_out, strides, padding, dilations) without return types