def find_config_path(dir=None):
    d = dir or os.getcwd()
    next_d = dirname(d)
    while d != next_d:
        p = join(d, ".sources")
        if exists(p):
            return p
        d = next_d
        next_d = dirname(d)
    else:
        raise RuntimeError("could not find a `.sources` config file")
Given an iterator of which further sub-elements may also be
dataset/ETHPy150Open trentm/sources/lib/sources.py/find_config_path--crossover with--dataset/ETHPy150Open ralfonso/theory/theory/model/mpdutil.py/flatten_iterator