def METHOD_NAME(operation_data):
    type_name = operation_data["_message_type"]
    assert type_name.startswith("Stellar") and type_name.endswith("Op")
    cls = getattr(messages, type_name)
    return protobuf.dict_to_proto(cls, operation_data)