code: def get_last_checkpoint():
      """Retrieves the most recent checkpoint (highest epoch number)."""
      checkpoint_dir = get_checkpoint_dir()
      checkpoints = [
          f for f in pathmgr.ls(checkpoint_dir) if _NAME_PREFIX in f
      ]
      last_checkpoint_name = sorted(checkpoints)[-1]
      return os.path.join(checkpoint_dir, last_checkpoint_name)
  
file_path: pycls/pycls/core/checkpoint.py
imports: import os
  import pycls.core.distributed
  import torch
  from pycls.core.config import cfg
  from pycls.core.io import pathmgr
  from pycls.core.net import unwrap_model
label_desc: Use image node_id 4 for calling a global function with example usage: get_last_checkpoint() and returns: os