code: def test_torch_checkpoint_wrapper_with_kwargs():
      checkpoint_wrapper = TorchCheckpointWrapper()
      module = ModuleWithKwargs(checkpoint_wrapper)
      module.train()
      x = torch.randn(2, 3)
      y = torch.randn(2, 3)
      loss = module(x, y=y).sum()
      loss.backward()
  
imports: import torch
  import torch.nn
  import pytest
  from allennlp.common.params import Params
  from allennlp.common.testing import multi_device
  from allennlp.nn.checkpoint.checkpoint_wrapper import CheckpointWrapper, TorchCheckpointWrapper
label_desc: Use image node_id 3 for calling a global function with example usage: test_torch_checkpoint_wrapper_with_kwargs() without return types