class_docstr: Tests for methods in piecewise module.
class_docstr_tok: ["Tests","for","methods","in","piecewise","module","."]
docstr: Tests find_interval_index is correct in the general case.
docstr_tok: ["Tests","find_interval_index","is","correct","in","the","general","case","."]
code: def test_find_interval_index(self):
      """Tests find_interval_index is correct in the general case."""
      interval_lower_xs = [0.25, 0.5, 1.0, 2.0, 3.0]
      query_xs = [0.25, 3.0, 5.0, 0.0, 0.5, 0.8]
      result = piecewise.find_interval_index(
          query_xs, interval_lower_xs
      )
      self.assertAllEqual(result, [0, 4, 4, -1, 1, 1])
  
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 Piecewise obj's underlying member method code with example usage: obj.test_find_interval_index() without return types