code: def testHomogeneous(self, scheme, accuracy_order):
      # Tests solving du/dt = At for a time step.
      # Compares with exact solution u(t) = exp(At) u(0).
  
      # Time step should be small enough to "resolve" different orders of accuracy
      time_step = 0.0001
      u = tf.constant([1, 2, -1, -2], dtype=tf.float64)
      matrix = tf.constant(
          [[1, -1, 0, 0], [3, 1, 2, 0], [0, -2, 1, 4], [0, 0, 3, 1]],
          dtype=tf.float64,
      )
  
      tridiag_form = self._convert_to_tridiagonal_format(matrix)
      actual = self.evaluate(
          scheme(u, 0, time_step, lambda t: (tridiag_form, None))
      )
      expected = self.evaluate(
          tf.squeeze(
              tf.matmul(
                  tf.linalg.expm(matrix * time_step),
                  tf.expand_dims(u, 1),
              )
          )
      )
  
      error_tolerance = 30 * time_step ** (accuracy_order + 1)
      self.assertLess(
          np.max(np.abs(actual - expected)), error_tolerance
      )
  
file_path: tf-quant-finance/tf_quant_finance/math/pde/steppers/time_marching_schemes_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the TimeMarchingSchemeTest obj's underlying member method code with example usage: obj.testHomogeneous(scheme, accuracy_order) without return types