code: def test_checkpoint_mode_invalid():
      model = nn.Sequential(nn.Linear(1, 1))
  
      with pytest.raises(
          ValueError,
          match="checkpoint is not one of 'always', 'except_last', or 'never'",
      ):
          Pipe(
              model,
              balance=[1],
              devices=["cpu"],
              chunks=2,
              checkpoint="INVALID_CHECKPOINT",
          )
  
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 11 for calling a global function with example usage: test_checkpoint_mode_invalid() without return types