code: def test_with_rank_list_tuple(self):
      with self.assertRaises(ValueError):
          tensorshape_util.with_rank([2], 2)
  
      with self.assertRaises(ValueError):
          tensorshape_util.with_rank((2,), 2)
  
      self.assertAllEqual((2, 1), tensorshape_util.with_rank((2, 1), 2))
      self.assertAllEqual([2, 1], tensorshape_util.with_rank([2, 1], 2))
  
      self.assertAllEqual(
          (2, 3, 4), tensorshape_util.with_rank_at_least((2, 3, 4), 2)
      )
      self.assertAllEqual(
          [2, 3, 4], tensorshape_util.with_rank_at_least([2, 3, 4], 2)
      )
  
file_path: probability/tensorflow_probability/python/internal/tensorshape_util_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the TensorShapeUtilTestTest obj's underlying member method code with example usage: obj.test_with_rank_list_tuple() without return types