code: def test_checkpoint(self, dtype, device):
      def g(x, y):
          return torch.nn.functional.dropout(x, 0.6)
  
      def fn(x, y):
          return torch.utils.checkpoint.checkpoint(
              g, x, y, use_reentrant=False
          )
  
      # x = torch.rand(2, 2, device="cuda", requires_grad=True)
      x = torch.ones(2, 2, device="cuda", requires_grad=True)
      y = torch.rand(2, 2, device="cuda", requires_grad=True)
      torch.cuda.manual_seed(123)
      ref = fn(x, y)
  
      # With checkpointing we should recompute dropout in bwd, and should see philox_rand
      fwd_compiler = functools.partial(count_philox_rand, freq=1)
      bwd_compiler = functools.partial(count_philox_rand, freq=1)
      aot_fn = aot_function(fn, fwd_compiler, bwd_compiler)
      # We cant check accuracy here because rand_like generated different rand numbers than dropout
      res = aot_fn(x, y)
      res.sum().backward()
  
imports: import sys
  import unittest
  import torch
  from torch.testing._internal.common_utils import TestCase, run_tests
  from torch.testing._internal.common_device_type import instantiate_device_type_tests, dtypes
  from functorch.compile import aot_function, nop, min_cut_rematerialization_partition
  from unittest.mock import patch
  import functools
  import torch.utils.checkpoint
  from torch.testing._internal.common_utils import IS_CI, IS_WINDOWS
label_desc: Use image node_id 9 for calling the TestFunctionalizationRngOps obj's underlying member method code with example usage: obj.test_checkpoint(dtype, device) and returns: torch, torch