class_docstr: Dormand-Prince explicit solver for non-stiff ODEs.
  
  Implements 5th order Runge-Kutta with adaptive step size control
  and dense output, using the Dormand-Prince method. Similar to the 'dopri5'
  method of `scipy.integrate.ode` and MATLAB's `ode45`. For details see [1].
  For solver API see `tfp.math.ode.Solver`.
  
  #### References
  
  [1]: Shampine, L. F. (1986). Some practical runge-kutta formulas.
      Mathematics of Computation, 46(173), 135-150, doi:10.2307/2008219
class_docstr_tok: ["Dormand-Prince","explicit","solver","for","non-stiff","ODEs",".","Implements","5th","order","Runge-Kutta","with","adaptive","step","size","control","and","dense","output",",","using","the","Dormand-Prince","method",".","Similar","to","the","'dopri5'","method","of","`","scipy.integrate.ode","`","and","MATLAB","'s","`","ode45","`",".","For","details","see","[","1","]",".","For","solver","API","see","`","tfp.math.ode.Solver","`",".","#","#","#","#","References","[","1","]",":","Shampine",",","L.","F.","(","1986",")",".","Some","practical","runge-kutta","formulas",".","Mathematics","of","Computation",",","46","(","173",")",",","135-150",",","doi:10.2307\/2008219"]
docstr: Constructs dynamic assertions that validate input values to `_solve`.
docstr_tok: ["Constructs","dynamic","assertions","that","validate","input","values","to","`","_solve","`","."]
code: def _assert_ops(
      self,
      ode_fn,
      initial_time,
      initial_state,
      solution_times,
      previous_solver_state,
      rtol,
      atol,
      first_step_size,
      safety_factor,
      min_step_size_factor,
      max_step_size_factor,
      max_num_steps,
      solution_times_by_solver,
  ):
      """Constructs dynamic assertions that validate input values to `_solve`."""
      assert_ops = []
      if not self._validate_args:
          return assert_ops
      if solution_times_by_solver:
          final_time = solution_times.final_time
          assert_ops.append(
              util.assert_positive(
                  final_time - initial_time, "final_time - initial_time"
              )
          )
      else:
          assert_ops += [
              util.assert_increasing(solution_times, "solution_times"),
              util.assert_nonnegative(
                  solution_times[0] - initial_time,
                  "solution_times[0] - initial_time",
              ),
          ]
      if previous_solver_state is not None:
          state_diff = (
              initial_state - previous_solver_state.current_state
          )
          assert_states_match = assert_util.assert_near(
              tf.norm(state_diff),
              0.0,
              message="`previous_solver_state` does not "
              "match the `initial_state`.",
          )
          assert_ops.append(assert_states_match)
      if self._max_num_steps is not None:
          assert_ops.append(
              util.assert_positive(max_num_steps, "max_num_steps")
          )
      assert_ops += [
          util.assert_positive(rtol, "rtol"),
          util.assert_positive(atol, "atol"),
          util.assert_positive(first_step_size, "first_step_size"),
          util.assert_positive(safety_factor, "safety_factor"),
          util.assert_positive(
              min_step_size_factor, "min_step_size_factor"
          ),
          util.assert_positive(
              max_step_size_factor, "max_step_size_factor"
          ),
      ]
      derivative = ode_fn(initial_time, initial_state)
      tf.nest.assert_same_structure(initial_state, derivative)
      return assert_ops
  
imports: import collections
  import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.math.ode import base
  from tensorflow_probability.python.math.ode import runge_kutta_util
  from tensorflow_probability.python.math.ode import util
  from tensorflow.python.util import nest
label_desc: Use image node_id 6 for calling the DormandPrince obj's underlying member method code with example usage: obj._assert_ops(ode_fn, initial_time, initial_state, solution_times, previous_solver_state, rtol, atol, first_step_size, safety_factor, min_step_size_factor, max_step_size_factor, max_num_steps, solution_times_by_solver) and returns: assert_ops, assert_ops