def METHOD_NAME(path, target):
    while True:
        if os.path.exists(os.path.join(path, target)):
            return True
        npath = os.path.dirname(path)
        if npath == path:
            break
        path = npath
    return False