code: def Serialize(self, writer):
          
          super(AccountState, self).Serialize(writer)
          writer.WriteUInt160(self.ScriptHash)
          writer.WriteBool(self.IsFrozen)
          writer.WriteVarInt(len(self.Votes))
          for vote in self.Votes:
              writer.WriteBytes(vote)
  
          blen = len(self.Balances)
          writer.WriteVarInt(blen)
  
          for key, fixed8 in self.Balances.items():
              writer.WriteUInt256(key)
              writer.WriteFixed8(fixed8)
docs: Serialize full object.
  
          Args:
              writer (neo.IO.BinaryWriter):