def copy_header_to_message(self, message, name, value):
        """
        Set header in email.Message

        :param message: message to set header to
        :param name: header name
        :param value: header value
        :return:
        """
        if name == 'subject':
            message.subject = self.decode_header_value(value)
        elif name == 'to':
            r = self.decode_address_header_value(value)
            if r:
                message.mail_to = r[0]
        elif name == 'from':
            r = self.decode_address_header_value(value)
            if r:
                message.mail_from = r[0]
        elif Message.ADDRESS_HEADERS in name:
            message._headers[name] = ",".join(self.decode_address_header_value(value))
        else:
            message._headers[name] = self.decode_header_value(value)
dataset/ETHPy150Open lavr/python-emails/emails/loader/local_store.py/MsgLoader.copy_header_to_message/swapped operands of `in`