code: def load_ckpt(
      model: torch.nn.Module,
      optimizer: Optional[torch.optim.Optimizer] = None,
      scheduler: Optional[Any] = None,
      epoch: int = -1,
  ) -> int:
      r"""Loads the model checkpoint at a given epoch."""
      epoch = get_ckpt_epoch(epoch)
      path = get_ckpt_path(epoch)
  
      if not osp.exists(path):
          return 0
  
      ckpt = torch.load(path)
      model.load_state_dict(ckpt[MODEL_STATE])
      if optimizer is not None and OPTIMIZER_STATE in ckpt:
          optimizer.load_state_dict(ckpt[OPTIMIZER_STATE])
      if scheduler is not None and SCHEDULER_STATE in ckpt:
          scheduler.load_state_dict(ckpt[SCHEDULER_STATE])
  
      return epoch + 1
  
file_path: GraphGym/graphgym/checkpoint.py
imports: import glob
  import os
  import os.path
  from typing import Any, Dict, List, Optional, Union
  import torch
  from graphgym.config import cfg
label_desc: Use image node_id 1 for calling a global function with example usage: load_ckpt(model, optimizer, scheduler, epoch) and returns: unknown, int