code: def checkpoint(function, *args):  # type: ignore
      """Checkpoint a model or part of the model.
      This has been directly copied from torch.utils.checkpoint."""
      return CheckpointFunction.apply(function, *args)
  
imports: import contextlib
  from typing import Dict, Iterator, Set, Union
  import torch
  from torch.cuda import _lazy_call
  from torch.utils.checkpoint import detach_variable
  from .initialize import get_data_parallel_rank, get_model_parallel_rank
label_desc: Use image node_id 4 for calling a global function with example usage: checkpoint(function) and returns: CheckpointFunction