def METHOD_NAME():
    """
    Returns the directories where config files could be found.
    Config files may be found in the following locations, in order:
    * current directory
    * parent directories until the root
    * ``$HOME/.verta/``
    .. versionchanged:: 0.20.4
        Directories for which ``os.listdir()`` fails (e.g. permission denied,
        doesn't exist for some reason) are gracefully skipped.
    Returns
    -------
    dirpaths : list of str
        Directories that could contain config files, with the closest to the current directory
        being first.
    """
    candidates = []
    # current dir
    curr_dir = os.getcwd()
    candidates.append(curr_dir)
    # parent dirs
    parent_dir = os.path.dirname(curr_dir)
    while parent_dir != candidates[-1]:
        candidates.append(parent_dir)
        parent_dir = os.path.dirname(parent_dir)
    # home verta dir
    if os.path.isdir(HOME_VERTA_DIR):
        candidates.append(HOME_VERTA_DIR)
    # filter out directories that can't be listed
    dirpaths = []
    for dirpath in candidates:
        try:
            os.listdir(dirpath)
        except Exception as e:
            logger.debug("skipping directory for client config:\n    %s", str(e))
            continue
        else:
            dirpaths.append(dirpath)
    return dirpaths