docstr: Test for Default boundary conditions.
  
  Tests solving heat equation with the following boundary conditions involving
  default boundary `u_xx(0, t) = 0` or `u_xx(5 pi, t) = 0`.
  
  The exact solution `u(x, t=0) = e^t sin(x)`.
  Args:
    lower_bc_type: Lower boundary condition type.
    upper_bc_type: Upper boundary condition type.
docstr_tok: ["Test","for","Default","boundary","conditions",".","Tests","solving","heat","equation","with","the","following","boundary","conditions","involving","default","boundary","`","u_xx","(","0",",","t",")","=","0","`","or","`","u_xx","(","5","pi",",","t",")","=","0","`",".","The","exact","solution","`","u","(","x",",","t=0",")","=","e^t","sin","(","x",")","`",".","Args",":","lower_bc_type",":","Lower","boundary","condition","type",".","upper_bc_type",":","Upper","boundary","condition","type","."]
code: def testHeatEquation_WithDefaultBoundaryCondtion(
      self, lower_bc_type, upper_bc_type
  ):
      """Test for Default boundary conditions.
  
      Tests solving heat equation with the following boundary conditions involving
      default boundary `u_xx(0, t) = 0` or `u_xx(5 pi, t) = 0`.
  
      The exact solution `u(x, t=0) = e^t sin(x)`.
      Args:
        lower_bc_type: Lower boundary condition type.
        upper_bc_type: Upper boundary condition type.
      """
  
      def final_cond_fn(x):
          return math.e * math.sin(x)
  
      def expected_result_fn(x):
          return tf.sin(x)
  
      @neumann
      def boundary_fn(t, x):
          del x
          return -tf.exp(t)
  
      lower_boundary_fn = (
          boundary_fn if lower_bc_type == "Neumann" else None
      )
      upper_boundary_fn = (
          boundary_fn if upper_bc_type == "Neumann" else None
      )
  
      grid = grids.uniform_grid(
          minimums=[0.0],
          maximums=[5 * math.pi],
          sizes=[1000],
          dtype=np.float32,
      )
      self._testHeatEquation(
          grid,
          final_t=1,
          time_step=0.01,
          final_cond_fn=final_cond_fn,
          expected_result_fn=expected_result_fn,
          one_step_fn=crank_nicolson_step(),
          lower_boundary_fn=lower_boundary_fn,
          upper_boundary_fn=upper_boundary_fn,
          error_tolerance=1e-3,
      )
  
imports: import math
  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 8 for calling the ParabolicEquationStepperTest obj's underlying member method code with example usage: obj.testHeatEquation_WithDefaultBoundaryCondtion(lower_bc_type, upper_bc_type) and returns: unknown, tf, unknown