write pb version of serialization/unserialization functions for each class
pb serialization of tree without gates and trans
pb serialization for different type of gates