class_docstr: Hook to checkpoint a model's task.
  
  Saves the checkpoints in checkpoint_folder.
code: def get_checkpoint_name(cls, phase_idx):
      return "model_phase-{phase}_end.torch".format(phase=phase_idx)
  
file_path: ClassyVision/classy_vision/hooks/checkpoint_hook.py
imports: import logging
  from typing import Any, Collection, Dict, Optional
  from classy_vision.generic.distributed_util import is_primary
  from classy_vision.generic.util import get_checkpoint_dict, save_checkpoint
  from classy_vision.hooks import register_hook
  from classy_vision.hooks.classy_hook import ClassyHook
  from fvcore.common.file_io import PathManager
label_desc: Use image node_id 2 for calling the CheckpointHook obj's underlying member method code with example usage: obj.get_checkpoint_name(cls, phase_idx) and returns: str