code: def build_cuve(interpolation_method=InterpolationMethod.CUBIC):
      valuation_date = dateslib.convert_to_date_tensor([(2020, 6, 15)])
      curve_dates = valuation_date + dateslib.periods.years([0, 1, 2])
      curve_disounts = [1.0, 0.95, 0.9]
      return rate_curve.RateCurve(
          curve_dates,
          curve_disounts,
          valuation_date,
          interpolator=interpolation_method,
          dtype=tf.float64,
      )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/market_data/rate_curve_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 a global function with example usage: build_cuve(interpolation_method) and returns: rate_curve