code: def error_ratio(backward_difference, error_coefficient, tol):
      """Computes the ratio of the error in the computed state to the tolerance."""
      tol_cast = tf.cast(tol, backward_difference.dtype)
      error_ratio_ = tf.norm(
          error_coefficient * backward_difference / tol_cast
      )
      return tf.cast(error_ratio_, tf.abs(backward_difference).dtype)
  
file_path: probability/tensorflow_probability/python/math/ode/bdf_util.py
imports: import collections
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 1 for calling a global function with example usage: error_ratio(backward_difference, error_coefficient, tol) and returns: tf