code: def test_chandrupatla_halts_at_fixed_point(self):
      # This search would naively get stuck at the interval
      # {a=1.4717137813568115, b=1.471713662147522}, which does not quite
      # satisfy the tolerance, but will never be tightened further because it has
      # the property that `0.5 * a + 0.5 * b == a` in float32. The search should
      # detect the fixed point and halt early.
      max_iterations = 50
      _, _, num_iterations = root_search.find_root_chandrupatla(
          lambda ux: tf.math.igamma(2.0, tf.nn.softplus(ux)) - 0.5,
          low=-100.0,
          high=100.0,
          position_tolerance=1e-8,
          value_tolerance=1e-8,
          max_iterations=max_iterations,
      )
      self.assertLess(self.evaluate(num_iterations), max_iterations)
  
imports: import numpy
  import scipy.optimize
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import special_math
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import root_search
label_desc: Use image node_id 4 for calling the ChandrupatlaRootSearchTest obj's underlying member method code with example usage: obj.test_chandrupatla_halts_at_fixed_point() without return types