A tree structure python dictionary implementation