class_docstr: Tests for methods in linear_interpolation module.
docstr: Tests linear interpolation with repeating values in x_data.
docstr_tok: ["Tests","linear","interpolation","with","repeating","values","in","x_data","."]
code: def test_linear_interpolation_repeating_values(
      self, optimize_for_tpu
  ):
      """Tests linear interpolation with repeating values in x_data."""
      x = [1.5]
      # Points (1, 1) and (2, 3) should be used to interpolate x=1.5.
      x_data = [0, 1, 1, 2, 2, 3]
      y_data = [0, 0, 1, 2, 3, 3]
  
      result = self.evaluate(
          tff.math.interpolation.linear.interpolate(
              x,
              x_data,
              y_data,
              optimize_for_tpu=optimize_for_tpu,
              dtype=tf.float32,
          )
      )
      self.assertAllClose(result, [1.5], 1e-8)
  
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 4 for calling the LinearInterpolation obj's underlying member method code with example usage: obj.test_linear_interpolation_repeating_values(optimize_for_tpu) without return types