def METHOD_NAME(
    self,
    net: nn.Module,
    x: torch.Tensor,
) -> None:
    x1 = x.clone()
    x2 = x.clone()
    x1.requires_grad = True
    x2.requires_grad = True
    net1 = net
    net2 = deepcopy(net)
    # no checkpoint
    with MemoryDelta(x.device) as mem1:
        loss1 = net1(x1).sum()
    graph_size1 = self._get_graph_size(loss1)
    loss1.backward()
    # with checkpoint
    checkpoint(net2.seq)
    with MemoryDelta(x.device) as mem2:
        loss2 = net2(x2).sum()
    loss2.backward()
    if x.is_cuda:
        self.assertTrue(mem2.delta() < mem1.delta())
    for p1, p2 in zip(net1.parameters(), net2.parameters()):
        self.assertEqual(p1.grad, p2.grad)