class_docstr: Tests for methods in linear_interpolation module.
docstr: Tests an error would be thrown if knots are empty.
docstr_tok: ["Tests","an","error","would","be","thrown","if","knots","are","empty","."]
code: def test_linear_interpolation_empty_xys(self, optimize_for_tpu):
      """Tests an error would be thrown if knots are empty."""
      x = [1, 2]
      x_data = []
      y_data = []
      with self.assertRaises(
          (tf.errors.InvalidArgumentError, ValueError)
      ):
          self.evaluate(
              tff.math.interpolation.linear.interpolate(
                  x,
                  x_data,
                  y_data,
                  optimize_for_tpu=optimize_for_tpu,
                  dtype=tf.float64,
              )
          )
  
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 6 for calling the LinearInterpolation obj's underlying member method code with example usage: obj.test_linear_interpolation_empty_xys(optimize_for_tpu) without return types