Added protobuf support in insert.py