code: def test_checkpoint_correctness():
      bar = lambda x, y: 2 * x + y + 5
      checkpointed_bar = checkpoint(bar)
      foo = lambda x: bar(x, x / 3.0) + bar(x, x**2)
      foo2 = lambda x: checkpointed_bar(x, x / 3.0) + checkpointed_bar(
          x, x**2
      )
      assert np.allclose(foo(3.0), foo2(3.0))
      assert np.allclose(grad(foo)(3.0), grad(foo2)(3.0))
  
      baz = lambda *args: sum(args)
      checkpointed_baz = checkpoint(baz)
      foobaz = lambda x: baz(x, x / 3.0)
      foobaz2 = lambda x: checkpointed_baz(x, x / 3.0)
      assert np.allclose(foobaz(3.0), foobaz2(3.0))
      assert np.allclose(grad(foobaz)(3.0), grad(foobaz2)(3.0))
  
imports: from __future__ import absolute_import
  from builtins import range
  import warnings
  from functools import partial
  import autograd.numpy
  import autograd.numpy.random
  from autograd.test_util import check_grads, check_equivalent
  from autograd.tracer import primitive, isbox
  from autograd import grad, elementwise_grad, jacobian, value_and_grad, hessian_tensor_product, hessian, make_hvp, tensor_jacobian_product, checkpoint, make_jvp, make_ggnvp, grad_and_aux
label_desc: Use image node_id 22 for calling a global function with example usage: test_checkpoint_correctness() without return types