code: def get_load_ckpt_paths(ckpt_path: str, dir_path: str, resume: bool):
      """
      Get the load_path and ckpt_path. They can be the same or different.
      #TODO: merging load_path and ckpt_path.
  
      Parameters
      ----------
      ckpt_path
          The path of one checkpoint, which can be None.
      dir_path
          The dir path from where to load model.
      resume
          Whether to resume training.
  
      Returns
      -------
      load_path and ckpt_path
      """
      if ckpt_path:
          load_path = ckpt_path
          logger.info(f"Loading checkpoint: '{ckpt_path}'")
      else:
          resume_ckpt_path = os.path.join(dir_path, LAST_CHECKPOINT)
          final_ckpt_path = os.path.join(dir_path, MODEL_CHECKPOINT)
          if resume:  # resume training which crashed before
              if not os.path.isfile(resume_ckpt_path):
                  if os.path.isfile(final_ckpt_path):
                      raise ValueError(
                          f"Resuming checkpoint '{resume_ckpt_path}' doesn't exist, but "
                          f"final checkpoint '{final_ckpt_path}' exists, which means training "
                          f"is already completed."
                      )
                  else:
                      raise ValueError(
                          f"Resuming checkpoint '{resume_ckpt_path}' and "
                          f"final checkpoint '{final_ckpt_path}' both don't exist. "
                          f"Consider starting training from scratch."
                      )
              load_path = resume_ckpt_path
              logger.info(
                  f"Resume training from checkpoint: '{resume_ckpt_path}'"
              )
              ckpt_path = resume_ckpt_path
          else:  # load a model checkpoint for prediction, evaluation, or continuing training on new data
              if not os.path.isfile(final_ckpt_path):
                  if os.path.isfile(resume_ckpt_path):
                      raise ValueError(
                          f"Final checkpoint '{final_ckpt_path}' doesn't exist, but "
                          f"resuming checkpoint '{resume_ckpt_path}' exists, which means training "
                          f"is not done yet. Consider resume training from '{resume_ckpt_path}'."
                      )
                  else:
                      raise ValueError(
                          f"Resuming checkpoint '{resume_ckpt_path}' and "
                          f"final checkpoint '{final_ckpt_path}' both don't exist. "
                          f"Consider starting training from scratch."
                      )
              load_path = final_ckpt_path
              logger.info(
                  f"Load pretrained checkpoint: {os.path.join(dir_path, MODEL_CHECKPOINT)}"
              )
              ckpt_path = (
                  None  # must set None since we do not resume training
              )
  
      return load_path, ckpt_path
  
file_path: autogluon/multimodal/src/autogluon/multimodal/utils/load.py
imports: import logging
  import os
  import pickle
  from typing import Dict, List, Optional, Tuple, Union
  from ..constants import LAST_CHECKPOINT, MODEL_CHECKPOINT
  from ..data import DocumentProcessor, NerProcessor, TextProcessor
  from ..models.utils import get_pretrained_tokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: get_load_ckpt_paths(ckpt_path, dir_path, resume) and returns: load_path,  ckpt_path