docstr: Test flattening with random inputs.
code: def test_flatten_batch_to_2d_random(self):
      """Test flattening with random inputs."""
      ndims_batch = np.random.randint(low=1, high=5)
      batch_dims = np.random.randint(low=1, high=10, size=ndims_batch)
      data_dims = np.random.randint(low=1, high=20, size=2)
      dims = np.concatenate([batch_dims, data_dims], axis=0)
      data = np.random.uniform(size=dims)
  
      with self.subTest(name="random_padding"):
          sizes = np.random.randint(
              low=0, high=data_dims[0], size=batch_dims
          )
          y, unflatten = utils.flatten_batch_to_2d(data, sizes)
          data_unflattened = unflatten(y)
  
          self.assertAllEqual(
              tf.shape(input=y), [np.sum(sizes), data_dims[1]]
          )
          self.assertAllEqual(
              tf.shape(input=data_unflattened), tf.shape(input=data)
          )
  
      with self.subTest(name="no_padding_with_sizes"):
          sizes = data_dims[0] * np.ones_like(sizes, dtype=np.int32)
          y, unflatten = utils.flatten_batch_to_2d(data, sizes)
  
          self.assertAllEqual(
              tf.shape(input=y), [np.sum(sizes), data_dims[1]]
          )
          self.assertAllEqual(data, unflatten(y))
  
      with self.subTest(name="no_padding_with_sizes_none"):
          y, unflatten = utils.flatten_batch_to_2d(data, sizes=None)
  
          self.assertAllEqual(
              tf.shape(input=y), [np.sum(sizes), data_dims[1]]
          )
          self.assertAllEqual(data, unflatten(y))
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import linalg
  import tensorflow
  from tensorflow_graphics.geometry.convolution import utils
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 5 for calling the UtilsFlattenBatchTo2dTests obj's underlying member method code with example usage: obj.test_flatten_batch_to_2d_random() without return types