def finalize_path_expansion(paths_expansion_list):
 path_seen = set()
 merged_paths = []
 for paths_expansion in paths_expansion_list:
  for p in paths_expansion.paths.dependencies:
   if (p not in path_seen):
    merged_paths.append(p)
    path_seen.add(p)
 return Paths(tuple(merged_paths))

def finalize_path_expansion ( paths_expansion_list ) : path_seen = set ( ) merged_paths = [ ] for paths_expansion in paths_expansion_list : for p in paths_expansion . paths . dependencies : if ( p not in path_seen ) : merged_paths . append ( p ) path_seen . add ( p ) return Paths ( tuple ( merged_paths ) )
finalize and merge pathexpansion lists into paths .