Node identity and relations mapping through python dictionary