def parse_test_proto(proto_type, proto_string): instance = proto_type() text_format.Merge(proto_string, instance) return instance