code: def locate_file(file_path: PathOrStr, config_dir: PathOrStr) -> str:
      """
      Locate a file, given a file path and configuration directory.
  
      Parameters
      ----------
      file_path : :class:`skll.types.PathOrStr`
          The file to locate. Path may be absolute or relative.
  
      config_dir : :class:`skll.types.PathOrStr`
          The path to the configuration file directory.
  
      Returns
      -------
      path_to_check : str
          The normalized absolute path, if it exists.
  
      Raises
      ------
      FileNotFoundError
          If the file does not exist.
      """
      if not file_path:
          return ""
  
      # convert to Path objects
      file_path = Path(file_path)
      config_dir = Path(config_dir)
  
      config_relative_path = config_dir / file_path
      path_to_check = (
          file_path
          if file_path.is_absolute()
          else config_relative_path.resolve()
      )
      if not path_to_check.exists():
          raise FileNotFoundError(
              errno.ENOENT,
              f"File {path_to_check} does not exist",
              str(path_to_check),
          )
      else:
          return str(path_to_check)
  
file_path: skll/skll/config/utils.py
imports: import csv
  import errno
  import logging
  from pathlib import Path
  from typing import Iterable, List, Union
  from ruamel.yaml import YAML
  from skll.types import FoldMapping, PathOrStr
label_desc: Use image node_id 3 for calling a global function with example usage: locate_file(file_path, config_dir) and returns: str, str