code: def get_dir_ckpt_paths(path: str):
      """
      Get the dir path and ckpt path from a path.
  
      Parameters
      ----------
      path
          A path which can be either a dir or ckpt path.
  
      Returns
      -------
      The dir and ckpt paths.
      """
      path = os.path.abspath(os.path.expanduser(path))
      if os.path.isfile(path):
          dir_path = os.path.dirname(path)
          ckpt_path = path
      else:
          dir_path = path
          ckpt_path = None
  
      return dir_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 2 for calling a global function with example usage: get_dir_ckpt_paths(path) and returns: dir_path,  ckpt_path