code: def test_weighted_sum_value_errors(self, dtype):
      del dtype  # not used in this test case.
      empty_weights = []
      empty_states = []
      with self.assertRaises(ValueError):
          _ = rk_util.weighted_sum(empty_weights, empty_states)
  
      wrong_length_weights = [0.5, -0.25, -0.25, 0]
      wrong_length_states = [
          (tf.eye(2), tf.ones((2, 2))) for _ in range(5)
      ]
      with self.assertRaises(ValueError):
          _ = rk_util.weighted_sum(
              wrong_length_weights, wrong_length_states
          )
  
      weights = [0.5, -0.25, -0.25, 0]
      not_same_structure_states = [
          (tf.eye(2), tf.ones((2, 2))) for _ in range(3)
      ]
      not_same_structure_states.append(tf.eye(2))
      with self.assertRaises(ValueError):
          _ = rk_util.weighted_sum(weights, not_same_structure_states)
  
file_path: probability/tensorflow_probability/python/math/ode/runge_kutta_util_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.ode import runge_kutta_util
label_desc: Use image node_id 5 for calling the RungeKuttaUtilTest obj's underlying member method code with example usage: obj.test_weighted_sum_value_errors(dtype) without return types