docstr: Check the exception when input data rank is invalid.
code: def test_convert_to_block_diag_2d_exception_raised_ranks(self):
      """Check the exception when input data rank is invalid."""
      with self.assertRaisesRegexp(
          ValueError, "must have a rank greater than 2"
      ):
          utils.convert_to_block_diag_2d(
              _dense_to_sparse(np.ones(shape=(3, 3)))
          )
  
      with self.assertRaisesRegexp(
          ValueError, "must have a rank greater than 2"
      ):
          utils.convert_to_block_diag_2d(
              _dense_to_sparse(np.ones(shape=(3,)))
          )
  
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 3 for calling the UtilsConvertToBlockDiag2dTests obj's underlying member method code with example usage: obj.test_convert_to_block_diag_2d_exception_raised_ranks() without return types