code: def test_grad_closure(self):
      # simplification of https://github.com/google/jax/issues/2718
      def experiment(x):
          def model(y, t):
              return -x * y
  
          history = odeint(model, 1.0, np.arange(0, 10, 0.1))
          return history[-1]
  
      jtu.check_grads(experiment, (0.01,), modes=["rev"], order=1)
  
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 10 for calling the ODETest obj's underlying member method code with example usage: obj.test_grad_closure() and returns: history, unknown