def find_deps(task, upstream_task_family):
 return set([t for t in dfs_paths(task, upstream_task_family)])

def find_deps ( task , upstream_task_family ) : return set ( [ t for t in dfs_paths ( task , upstream_task_family ) ] )
finds all dependencies that start with the given task and have a path to upstream_task_family returns all deps on all paths between task and upstream .