code: def _tostream(self, stream, skipprepack= False):
          '''
          Convert the struct into a bytes stream. This is the standard way to convert a NamedStruct to bytes.
          
          :param stream: a list of bytes to get the result
          
          :param skipprepack: if True, the prepack stage is skipped. For parser internal use.
          
          :returns: total appended size
          '''
          if not skipprepack:
              self._prepack()
          datasize = self._packto(stream)
          paddingSize = self._parser.paddingsize2(datasize)
          if paddingSize > datasize:
              stream.write(b'\x00' * (paddingSize - datasize))
          return paddingSizf _tostream(self, stream, skipprepack= False):
          '''
          Convert the struct into a bytes stream. This is the standard way to convert a NamedStruct to bytes.
          
          :param stream: a list of bytes to get the result
          
          :param skipprepack: if True, the prepack stage is skipped. For parser internal use.
          
          :returns: total appended size
          '''
          if not skipprepack:
              self._prepack()
          datasize = self._packto(stream)
          paddingSize = self._parser.paddingsize2(datasize)
          if paddingSize > datasize:
              stream.write(b'\x00' * (paddingSize - datasize))
          return paddingSize
docs: Convert the struct into a bytes stream. This is the standard way to convert a NamedStruct to bytes.
          
          :param stream: a list of bytes to get the result
          
          :param skipprepack: if True, the prepack stage is skipped. For parser internal use.
          
          :returns: total appended size