code: def test_static_shape(self, x_shape, num_dims):
      x = tf.ones(x_shape)
      y = batch_apply.merge_leading_dims(x, num_dims)
      y_shape = (np.prod(x_shape[:num_dims]),) + x_shape[num_dims:]
      self.assertEqual(y.shape, y_shape)
  
imports: from absl.testing import parameterized
  import numpy
  from sonnet.src import base
  from sonnet.src import batch_apply
  from sonnet.src import test_utils
  import tensorflow
label_desc: Use image node_id 2 for calling the MergeLeadingDimsTest obj's underlying member method code with example usage: obj.test_static_shape(x_shape, num_dims) without return types