def METHOD_NAME(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