code: def test_douglas_step_2d(self):
      u = np.arange(1, 17, dtype=np.float32).reshape(4, 4)
      d = np.arange(11, 27, dtype=np.float32).reshape(4, 4)
      dx = np.array([d, -3 * d, 2 * d])
      dy = np.array([2 * d, -6 * d, 4 * d])
      dxy = np.arange(-8, 8, dtype=np.float32).reshape(4, 4)
      bx = np.arange(2, 18, dtype=np.float32).reshape(4, 4)
      by = np.arange(5, 21, dtype=np.float32).reshape(4, 4)
      theta = 0.3
  
      def equation_params_fn(t):
          del t
          return (
              [
                  [_tfconst(dy), _spread_mixed_term(_tfconst(dxy))],
                  [None, _tfconst(dx)],
              ],
              [_tfconst(by), _tfconst(bx)],
          )
  
      scheme = douglas_adi_scheme(theta=theta)
  
      def pad_fn(t):
          paddings = tf.constant([[1, 1], [1, 1]])
          return tf.pad(t, paddings)
  
      actual = self.evaluate(
          scheme(
              value_grid=tf.constant(u, dtype=tf.float32),
              t1=0,
              t2=1,
              equation_params_fn=equation_params_fn,
              append_boundaries_fn=pad_fn,
              n_dims=2,
              has_default_lower_boundary=[False, False],
              has_default_upper_boundary=[False, False],
          )
      )
      expected = self._simplified_douglas_step_2d(
          u, dx, dy, dxy, bx, by, 0, 1, theta
      )
      self.assertLess(np.max(np.abs(expected - actual)), 0.01)
  
file_path: tf-quant-finance/tf_quant_finance/math/pde/steppers/douglas_adi_scheme_test.py
imports: 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 DouglasAdiSchemeTest obj's underlying member method code with example usage: obj.test_douglas_step_2d() and returns: list,  list, tf