def get_insert_dict(tree, names):
 d = {}
 for n in tree.tips():
  if (n.Name and (n.Name in names)):
   if (n.Name not in d):
    d[n.Name] = []
   d[n.Name].append(n)
 return d

def get_insert_dict ( tree , names ) : d = { } for n in tree . tips ( ) : if ( n . Name and ( n . Name in names ) ) : if ( n . Name not in d ) : d [ n . Name ] = [ ] d [ n . Name ] . append ( n ) return d
this function returns the nodes labeled as inserted .