code: def _SerializeEntries(entries):
    
  
    output = []
    for python_format, wire_format, type_descriptor in entries:
  
      if wire_format is None or (python_format and
                                 type_descriptor.IsDirty(python_format)):
        wire_format = type_descriptor.ConvertToWireFormat(python_format)
  
      precondition.AssertIterableType(wire_format, bytes)
      output.extend(wire_format)
  
    return b"".join(output)
docs: Serializes given triplets of python and wire values and a descriptor.