code: def _log_cdf_chernoff_bound(x, df, noncentrality):
      """Implements a Chernoff bound on in the log domain on the CDF of a noncentral Chi2 random variable.
  
      Implements Eqs (22) and (23) in Shnidman, D. A. The Calculation of the
      Probability of Detection and the Generalized Marcum Q-Function (1989)
      The substitutions used are self.df = 2N, self.nc = 2NX and x = 2Y
  
      Args:
        x: `tf.Tensor` of points at which to evaluate the Chernoff bound.
        df: `tf.Tensor` of the degrees of freedom of the NC2 variate.
        noncentrality: `tf.Tensor` of the noncentrality of the NC2 variate.
  
      Returns:
        `tf.Tensor` of Chernoff bounds on the log CDF.
      """
  
      df_over_2x = tf.math.xdivy(df, 2.0 * x)
  
      # Quantity in Eq (22)
      chernoff_coef = (
          1.0
          - df_over_2x
          - tf.math.sqrt(
              tf.math.square(df_over_2x)
              + tf.math.xdivy(noncentrality, x)
          )
      )
  
      # Exponent in Eq (23)
      bound = (
          -chernoff_coef * x
          + noncentrality * chernoff_coef / (1.0 - chernoff_coef)
          - tf.math.xlog1py(df, -chernoff_coef)
      )
      bound = 0.5 * bound
  
      return bound
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import chi2
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import special_math
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import bessel
  from tensorflow_probability.python.math import generic
  from tensorflow_probability.python.math import root_search
  import tensorflow_probability.python.random
label_desc: Use image node_id 3 for calling a global function with example usage: _log_cdf_chernoff_bound(x, df, noncentrality) and returns: bound