class_docstr: Basic model with a single FFN being checkpointed.
  
  Used for extensive checkings: equivalency with non-checkpoint, torch-checkpoint, etc.
class_docstr_tok: ["Basic","model","with","a","single","FFN","being","checkpointed",".","Used","for","extensive","checkings",":","equivalency","with","non-checkpoint",",","torch-checkpoint",",","etc","."]
code: def forward(self, x):
      if self.use_pytorch_checkpoint:
          x = torch_checkpoint_wrapper(self.ffn, x)
      else:
          x = self.ffn(x)
      return self.out(x)
  
imports: import pytest
  import torch
  import torch.nn
  from torch.utils.checkpoint import checkpoint
  from fairscale.fair_dev.testing.testing import skip_if_no_cuda
  from fairscale.internal import torch_version
  from fairscale.nn.checkpoint.checkpoint_activations import checkpoint_wrapper, disable_checkpointing
  from fairscale.nn.misc import FlattenParamsWrapper
  from fairscale.nn.misc import checkpoint_wrapper
label_desc: Use image node_id 2 for calling the BasicModel obj's underlying member method code with example usage: obj.forward(x) and returns: self