def _match_message_set(self):
        """
        Messages with message sequence numbers corresponding to the
        specified message sequence number set

        The sequence will be a list of integers and tuples. An integer
        indicates a specific sequence number. A tuple indicates a range.

        One trick, an integer may be '*' which means the last message
        sequence number in our mailbox.
        """
        for elt in self.args["msg_set"]:
            if isinstance(elt,str) and elt == "*" and self.ctx.msg_number == self.id_max:
                return True
            elif isinstance(elt,int) and elt == self.ctx.msg_number:
                return True
            elif isinstance(elt, tuple) and (self.ctx.msg_number >= elt[0] and \
                                             self.ctx.msg_number <= elt[1]):
                return True
        return False

    #########################################################################
    #
dataset/ETHPy150Open scanner/asimap/asimap/search.py/IMAPSearch._match_message_set/original