code: def test_linear_ode_dense(self, solver, solution_times_fn):
      np.random.seed(0)
      initial_time = 0.0
      num_odes = 20
      initial_state = np.float64([1.0] * num_odes)
      jacobian = np.random.randn(num_odes, num_odes)
  
      def ode_fn(_, state):
          return tf.squeeze(tf.matmul(jacobian, state[:, tf.newaxis]))
  
      final_time = 1.0
      solver_instance = solver(rtol=_RTOL, atol=_ATOL)
      results = solver_instance.solve(
          ode_fn,
          initial_time,
          initial_state,
          solution_times=solution_times_fn(final_time),
          jacobian_fn=jacobian,
      )
      final_state = self.evaluate(results.states[-1])
      # Exact solution is obtained by diagonalizing the Jacobian by
      # `jacobian = V diag(w) V^{-1}` and making the change of variables `Vz = y`.
      eigvals, eigvecs = np.linalg.eig(jacobian)
      initial_state_changed = np.matmul(
          np.linalg.inv(eigvecs), initial_state
      )
      final_state_changed_exact = (
          np.exp(eigvals * final_time) * initial_state_changed
      )
      final_state_exact = np.matmul(eigvecs, final_state_changed_exact)
      self.assertAllClose(final_state, final_state_exact)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.ode import base
  from tensorflow_probability.python.math.ode import bdf
  from tensorflow_probability.python.math.ode import dormand_prince
label_desc: Use image node_id 7 for calling the NonStiffTest obj's underlying member method code with example usage: obj.test_linear_ode_dense(solver, solution_times_fn) and returns: tf