code: def ToStream(value):
          
          ms = StreamManager.GetStream()
          writer = BinaryWriter(ms)
  
          value.Serialize(writer)
  
          retVal = ms.getvalue()
          StreamManager.ReleaseStream(ms)
  
          return retVal
docs: Serialize the given `value` to a an array of bytes.
  
          Args:
              value (neo.IO.Mixins.SerializableMixin): object extending SerializableMixin.
  
          Returns:
              bytes: not hexlified