def fetch(self, ctx):
        """
        This method applies fetch criteria that this object represents
        to the message and message entry being passed in.

        It returns the part of the message wanted as a string ready to
        be sent right back to the client that asked for it.

        NOTE: In case you are wondering a FETCH of a message can cause
        it to gain a '\Seen' flag.
        """
        self.ctx = ctx

        # Based on the operation figure out what subroutine does the rest
        # of the work.
        #
        if self.attribute == "body":
            result = self.body(self.ctx.msg, self.section)
        elif self.attribute == "bodystructure":
            result = self.bodystructure(self.ctx.msg)
        elif self.attribute == "envelope":
            result = self.envelope(self.ctx.msg)
        elif self.attribute == "flags":
            result = '(%s)' % ' '.join(
                [asimap.constants.seq_to_flag(x) for x in self.ctx.sequences])
        elif self.attribute == "internaldate":
            result = '"%s"' % \
                self.ctx.internal_date.strftime("%d-%b-%Y %H:%m:%S %z")
        elif self.attribute == "rfc822.size":
            result = str(len(self.ctx.mailbox.mailbox.get_string(
                self.ctx.msg_key)))
        elif self.attribute == "uid":
            result = str(self.ctx.uid)
        else:
            raise NotImplemented

        return (str(self), result) % "%s %s"

    #######################################################################
    #
dataset/ETHPy150Open scanner/asimap/asimap/fetch.py/FetchAtt.fetch/swapped operands of `%`