code: def tobytes(self, prim, skipprepack = False):
          '''
          Compatible to Parser.tobytes()
          '''
          stream = BytesIO()
          self.tostream(prim, stream, skipprepack=skipprepack)
          return stream.getvalue(f tobytes(self, prim, skipprepack = False):
          '''
          Compatible to Parser.tobytes()
          '''
          stream = BytesIO()
          self.tostream(prim, stream, skipprepack=skipprepack)
          return stream.getvalue()
docs: Compatible to Parser.tobytes()