pydict function to create a python id -> parent id dict from a newick