code: def has_checkpoint():
      """Determines if there are checkpoints available."""
      checkpoint_dir = get_checkpoint_dir()
      if not pathmgr.exists(checkpoint_dir):
          return False
      return any(_NAME_PREFIX in f for f in pathmgr.ls(checkpoint_dir))
  
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 5 for calling a global function with example usage: has_checkpoint() and returns: any, False