docstr: Tests that bisect works on a 1 variable scalar valued function.
docstr_tok: ["Tests","that","bisect","works","on","a","1","variable","scalar","valued","function","."]
code: def test_bisect_simple(self):
      """Tests that bisect works on a 1 variable scalar valued function."""
      wolfe_threshold = 1e-6
      x = np.array([0.0, 0.5, 1.0])
      y = np.array([1.0, 0.6, 1.2])
      dy = np.array([-0.8, 0.6, -0.7])
      fun = _test_function_x_y_dy(x, y, dy)
  
      val_a = fun(0.0)  # Value at zero.
      val_b = fun(1.0)  # Value at initial step.
      f_lim = val_a.f + (wolfe_threshold * tf.abs(val_a.f))
  
      result = self.evaluate(hzl.bisect(fun, val_a, val_b, f_lim))
      self.assertEqual(result.right.x, 0.5)
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.gradient import value_and_gradient
  from tensorflow_probability.python.optimizer.linesearch.internal import hager_zhang_lib
label_desc: Use image node_id 8 for calling the HagerZhangLibTest obj's underlying member method code with example usage: obj.test_bisect_simple() without return types