@classmethod
def from_pairs(cls, pairs):
    """ Create message from an iterable of ``(tag, value, is_header)`` tuples.

        :param pairs: An iterable of 3-tuple's ``(tag, value, is_header)``.
            `is_header` specifies whether the pair should be appended to the
            standard header or not.
        :return:
        """
    msg = cls()
    for tag, val, is_header in pairs:
        msg.append_pair(tag, val, header=is_header)
    return msg
