def store(messages, flags, mode, uid):
        """
        Set the flags of one or more messages.

        @type messages: A MessageSet object with the list of messages requested
        @param messages: The identifiers of the messages to set the flags of.

        @type flags: sequence of L{str}
        @param flags: The flags to set, unset, or add.

        @type mode: -1, 0, or 1
        @param mode: If mode is -1, these flags should be removed from the
            specified messages. If mode is 1, these flags should be added to
            the specified messages. If mode is 0, all existing flags should be
            cleared and these flags should be added.

        @type uid: L{bool}
        @param uid: If true, the IDs specified in the query are UIDs; otherwise
            they are message sequence IDs.

        @rtype: L{dict} or L{Deferred}
        @return: A L{dict} mapping message sequence numbers to sequences of
            L{str} representing the flags set on the message after this
            operation has been performed, or a L{Deferred} whose callback will
            be invoked with such a L{dict}.

        @raise ReadOnlyMailbox: Raised if this mailbox is not open for
            read-write.
        """

        Set the flags of one or more messages.

        @type messages: A MessageSet object with the list of messages requested
        @param messages: The identifiers of the messages to set the flags of.

        @type flags: sequence of L{str}
        @param flags: The flags to set, unset, or add.

        @type mode: -1, 0, or 1
        @param mode: If mode is -1, these flags should be removed from the
            specified messages. If mode is 1, these flags should be added to
            the specified messages. If mode is 0, all existing flags should be
            cleared and these flags should be added.

        @type uid: L{bool}
        @param uid: If true, the IDs specified in the query are UIDs; otherwise
            they are message sequence IDs.

        @rtype: L{dict} or L{Deferred}
        @return: A L{dict} mapping message sequence numbers to sequences of
            L{str} representing the flags set on the message after this
            operation has been performed, or a L{Deferred} whose callback will
            be invoked with such a L{dict}.

        @raise ReadOnlyMailbox: Raised if this mailbox is not open for
            read-write.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/interfaces.py