def parse_references(self, references, in_reply_to):
    references = self.parse_message_ids(references)
    if len(references):
        return references[(- 1)]
    in_reply_to = self.parse_message_ids(in_reply_to)
    if len(in_reply_to):
        return in_reply_to[0]
def parse_references(self, references, in_reply_to):
    references = self.parse_message_ids(references)
    if len(references):
        return references[(- 1)]
    in_reply_to = self.parse_message_ids(in_reply_to)
    if len(in_reply_to):
        return in_reply_to[0]