def initial_has_dependencies(tree, to_process):
 has_dependencies = []
 for n in tree.nontips(include_self=True):
  if (n not in to_process):
   has_dependencies.append(n)
 return has_dependencies

def initial_has_dependencies ( tree , to_process ) : has_dependencies = [ ] for n in tree . nontips ( include_self = True ) : if ( n not in to_process ) : has_dependencies . append ( n ) return has_dependencies
all nodes that arent processed up front stll have dependencies to_process : set of nodes that are in the first round of processing .