code: def encode(self):
          
  
          contents = self.encode_contents()
          record_type = self.MatchType()
  
          header = struct.pack("<LB3x", len(contents) + UpdateRecord.HEADER_LENGTH, record_type)
  
          return bytearray(header) + contents
docs: Encode this record into binary, suitable for embedded into an update script.
  
          This function just adds the required record header and delegates all
          work to the subclass implementation of encode_contents().
  
          Returns:
              bytearary: The binary version of the record that could be parsed via
                  a call to UpdateRecord.FromBinary()