code: def test_first_step_size_is_large_when_ode_fn_is_constant(
      self, dtype
  ):
      initial_state_vec = tf.constant([1.0], dtype=dtype)
      real_dtype = abs(initial_state_vec).dtype
      atol = tf.constant(1e-12, dtype=real_dtype)
      first_order_bdf_coefficient = -0.1850
      first_order_error_coefficient = first_order_bdf_coefficient + 0.5
      initial_time = tf.constant(0.0, dtype=real_dtype)
      ode_fn_vec = lambda time, state: 1.0
      rtol = tf.constant(1e-8, dtype=real_dtype)
      safety_factor = tf.constant(0.9, dtype=real_dtype)
      max_step_size = 1.0
      step_size = bdf_util.first_step_size(
          atol,
          first_order_error_coefficient,
          initial_state_vec,
          initial_time,
          ode_fn_vec,
          rtol,
          safety_factor,
          max_step_size=max_step_size,
      )
      # Step size should be maximal.
      self.assertAllClose(self.evaluate(step_size), max_step_size)
  
file_path: probability/tensorflow_probability/python/math/ode/bdf_util_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.ode import bdf_util
label_desc: Use image node_id 1 for calling the BDFUtilTest obj's underlying member method code with example usage: obj.test_first_step_size_is_large_when_ode_fn_is_constant(dtype) without return types