2 ways conversion between protocol buffers and dictionaries in Python