docstr: Test max step size control.
docstr_tok: ["Test","max","step","size","control","."]
code: def test_hmax(self):
      """Test max step size control."""
  
      def rhs(y, t):
          return jnp.piecewise(
              t,
              [t <= 2.0, (t >= 5.0) & (t <= 7.0)],
              [
                  lambda s: jnp.array(1.0),
                  lambda s: jnp.array(-1.0),
                  lambda s: jnp.array(0.0),
              ],
          )
  
      ys = odeint(
          func=rhs,
          y0=jnp.array(0.0),
          t=jnp.array([0.0, 5.0, 10.0]),
          hmax=1.0,
      )
  
      self.assertTrue(jnp.abs(ys[1] - 2.0) < 1e-4)
      self.assertTrue(jnp.abs(ys[2]) < 1e-4)
  
imports: from functools import partial
  from absl.testing import absltest
  import numpy
  import jax
  from jax._src import test_util
  import jax.numpy
  from jax.experimental.ode import odeint
  from jax.tree_util import tree_map
  import scipy.integrate
  from jax import config
label_desc: Use image node_id 15 for calling the ODETest obj's underlying member method code with example usage: obj.test_hmax() and returns: jnp