def get_path_matching(name):
    """Get path matching a name.

    Parameters
    ----------
    name : string
        Name to search for.

    Returns
    -------
    string
        Full filepath.
    """
    # first try looking in the user folder
    p = os.path.join(os.path.expanduser("~"), name)
    # then try expanding upwards from cwd
    if not os.path.isdir(p):
        p = None
        drive, folders = os.path.splitdrive(os.getcwd())
        folders = folders.split(os.sep)
        folders.insert(0, os.sep)
        if name in folders:
            p = os.path.join(drive, *folders[: folders.index(name) + 1])
    # TODO: something more robust to catch the rest of the cases?
    return p
Get path matching a name.

    Parameters
    ----------
    name : string
        Name to search for.

    Returns
    -------
    string
        Full filepath.