docstr: Simple test for the shift term.
  
  The equation is `u_{t} + a u = 0`, the solution is
  `u(x, y, t) = exp(-a(t - t_final)) u(x, y, t_final)`
docstr_tok: ["Simple","test","for","the","shift","term",".","The","equation","is","`","u_","{","t","}","+","a","u","=","0","`",",","the","solution","is","`","u","(","x",",","y",",","t",")","=","exp","(","-a","(","t","-","t_final",")",")","u","(","x",",","y",",","t_final",")","`"]
code: def testShiftTerm(self):
      """Simple test for the shift term.
  
      The equation is `u_{t} + a u = 0`, the solution is
      `u(x, y, t) = exp(-a(t - t_final)) u(x, y, t_final)`
      """
      grid = grids.uniform_grid(
          minimums=[-10, -20],
          maximums=[10, 20],
          sizes=[201, 301],
          dtype=tf.float32,
      )
      ys = self.evaluate(grid[0])
      xs = self.evaluate(grid[1])
  
      time_step = 0.1
      final_t = 1
      variance = 1
      a = 2
  
      def zeroth_order_coeff_fn(t, location_grid):
          del t, location_grid
          return a
  
      expected = np.outer(
          _gaussian(ys, variance), _gaussian(xs, variance)
      ) * np.exp(a * final_t)
  
      final_values = tf.expand_dims(
          tf.constant(
              np.outer(
                  _gaussian(ys, variance), _gaussian(xs, variance)
              ),
              dtype=tf.float32,
          ),
          axis=0,
      )
      bound_cond = [
          (_zero_boundary, _zero_boundary),
          (_zero_boundary, _zero_boundary),
      ]
      step_fn = douglas_adi_step(theta=0.5)
      result = fd_solvers.solve_backward(
          start_time=final_t,
          end_time=0,
          coord_grid=grid,
          values_grid=final_values,
          time_step=time_step,
          one_step_fn=step_fn,
          boundary_conditions=bound_cond,
          zeroth_order_coeff_fn=zeroth_order_coeff_fn,
          dtype=grid[0].dtype,
      )
  
      self._assertClose(expected, result)
  
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 10 for calling the MultidimParabolicEquationStepperTest obj's underlying member method code with example usage: obj.testShiftTerm() and returns: a