code: def Trim(self):
          
          ms = StreamManager.GetStream()
          writer = BinaryWriter(ms)
          self.SerializeUnsigned(writer)
          writer.WriteByte(1)
          self.Script.Serialize(writer)
  
          writer.WriteHashes([tx.Hash.ToBytes() for tx in self.Transactions])
          retVal = ms.ToArray()
          StreamManager.ReleaseStream(ms)
          return retVal
docs: Returns a byte array that contains only the block header and transaction hash.
  
          Returns:
              bytes: