code: def test_checkpoint_mode_when_chunks_1():
      model = nn.Sequential(nn.Linear(1, 1))
  
      # All checkpoint modes are fine.
      Pipe(
          model,
          balance=[1],
          devices=["cpu"],
          chunks=1,
          checkpoint="except_last",
      )
      Pipe(
          model,
          balance=[1],
          devices=["cpu"],
          chunks=1,
          checkpoint="always",
      )
      Pipe(
          model,
          balance=[1],
          devices=["cpu"],
          chunks=1,
          checkpoint="never",
      )
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import time
  import pytest
  import torch
  from torch import nn
  from fairscale.nn.pipe import Pipe
label_desc: Use image node_id 12 for calling a global function with example usage: test_checkpoint_mode_when_chunks_1() without return types