code: def test_andersen_lake_values(
      self,
      k,
      tau,
      r,
      f,
      q,
      is_call_options,
      sigma,
      s,
      forwards,
      grid_num_points=30,
      integration_num_points_kronrod=31,
      integration_num_points_legendre=32,
      tolerance_exercise_boundary=1e-11,
      tolerance_kronrod=1e-11,
      max_iterations_exercise_boundary=200,
      max_depth_kronrod=50,
      test_tolerance=1e-3,
      dtype=tf.float64,
  ):
      tau_binomial = tf.constant(tau, dtype=dtype)
      r_binomial = r
      if f is not None:
          f = tf.constant(f, dtype=dtype)
          r_binomial = tf.math.divide_no_nan(
              -tf.math.log(f), tau_binomial
          )
      if q is not None:
          q_binomial = tf.constant(q, dtype=tf.float64)
      else:
          q_binomial = tf.constant([0.0], dtype=dtype)
      s_binomial = s
      if forwards is not None:
          forwards_binomial = tf.constant(forwards, dtype=dtype)
          s_binomial = forwards_binomial * tf.exp(
              -(r_binomial - q_binomial) * tau_binomial
          )
      expected = option_price_binomial(
          volatilities=sigma,
          strikes=k,
          expiries=tau,
          spots=s_binomial,
          discount_rates=r_binomial,
          dividend_rates=q,
          is_call_options=is_call_options,
          is_american=True,
          num_steps=1000,
          dtype=dtype,
      )
      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, atol=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 1 for calling the ExerciseBoundaryTest obj's underlying member method code with example usage: obj.test_andersen_lake_values(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