code: def next_step_size(
      step_size,
      order,
      error_ratio,
      safety_factor,
      min_step_size_factor,
      max_step_size_factor,
  ):
      """Computes the next step size to use.
  
      Computes the next step size by applying a multiplicative factor to the current
      step size. This factor is
      ```none
      factor_unclamped = error_ratio**(-1. / (order + 1)) * safety_factor
      factor = clamp(factor_unclamped, min_step_size_factor, max_step_size_factor)
      ```
  
      Args:
        step_size: Scalar float `Tensor` specifying the current step size.
        order: Scalar integer `Tensor` specifying the order of the method.
        error_ratio: Scalar float `Tensor` specifying the ratio of the error in the
          computed state and the tolerance.
        safety_factor: Scalar float `Tensor`.
        min_step_size_factor: Scalar float `Tensor` specifying a lower bound on the
          multiplicative factor.
        max_step_size_factor: Scalar float `Tensor` specifying an upper bound on the
          multiplicative factor.
  
      Returns:
        Scalar float `Tensor` specifying the next step size.
      """
      order_cast = tf.cast(order, error_ratio.dtype)
      factor = error_ratio ** (-1.0 / (order_cast + 1.0))
      return step_size * tf.clip_by_value(
          safety_factor * factor,
          min_step_size_factor,
          max_step_size_factor,
      )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.math import gradient
  from tensorflow.python.util import nest
label_desc: Use image node_id 11 for calling a global function with example usage: next_step_size(step_size, order, error_ratio, safety_factor, min_step_size_factor, max_step_size_factor) and returns: unknown