from pathlib import Path


def exhaustive_directory_search(root, filename):
    """Executes an exhaustive, recursive directory search of all downstream
    directories, finding directories which contain a file matching the provided
    file name query string.

    Parameters
    ----------
    root : os.PathLike
        The path (absolute or relative) to the directory from which to conduct
        the exhaustive search.
    filename : str
        The exact name of the file which identifies a directory as one of
        interest.

    Returns
    -------
    list of os.PathLike
        A list of directories containing the filename provided.
    """

    return [xx.parent for xx in Path(root).rglob(filename)]