code: def test_andersen_lake_tau_zero(
      self,
      k,
      tau,
      r,
      f,
      q,
      is_call_options,
      sigma,
      s,
      forwards,
      grid_num_points,
      integration_num_points_kronrod,
      integration_num_points_legendre,
      tolerance_exercise_boundary,
      tolerance_kronrod,
      max_iterations_exercise_boundary,
      max_depth_kronrod,
      test_tolerance,
      dtype,
  ):
      k_tensor = tf.constant(k, dtype=dtype)
      s_tensor = tf.constant(s, dtype=dtype)
      is_call_options_tensor = tf.constant(
          is_call_options, dtype=tf.bool
      )
      expected = tf.where(
          is_call_options_tensor,
          tf.math.maximum(s_tensor - k_tensor, 0),
          tf.math.maximum(k_tensor - s_tensor, 0),
      )
      expected_prices = np.array(self.evaluate(expected))
      computed_prices = andersen_lake(
          volatilities=sigma,
          strikes=k,
          expiries=tau,
          spots=s,
          forwards=forwards,
          discount_rates=r,
          discount_factors=f,
          dividend_rates=q,
          is_call_options=is_call_options,
          grid_num_points=grid_num_points,
          integration_num_points_kronrod=integration_num_points_kronrod,
          integration_num_points_legendre=integration_num_points_legendre,
          max_iterations_exercise_boundary=max_iterations_exercise_boundary,
          max_depth_kronrod=max_depth_kronrod,
          tolerance_exercise_boundary=tolerance_exercise_boundary,
          tolerance_kronrod=tolerance_kronrod,
          dtype=dtype,
      )
      computed_prices = np.array(self.evaluate(computed_prices))
      np.testing.assert_allclose(
          computed_prices, expected_prices, rtol=test_tolerance
      )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/american_option_pricing/andersen_lake_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 3 for calling the ExerciseBoundaryTest obj's underlying member method code with example usage: obj.test_andersen_lake_tau_zero(k, tau, r, f, q, is_call_options, sigma, s, forwards, grid_num_points, integration_num_points_kronrod, integration_num_points_legendre, tolerance_exercise_boundary, tolerance_kronrod, max_iterations_exercise_boundary, max_depth_kronrod, test_tolerance, dtype) without return types