<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def serialize_email_messages(messages: List[EmailMessage]):
 """Serialize EmailMessages to be passed as task argument. Pickle is used because serializing an EmailMessage to json can be a bit tricky and would probably break if Django modifies the structure of the object in the future. """

    return [
        base64.b64encode(zlib.compress(pickle.dumps(m, protocol=4))).decode()
        for m in messages
    ]