def get_messages(self, uid, token, interval, iden):
        """
        Retrieve list of messages.

        :param uid: User's uid.
        :param token: Token of the user.
        :param interval: Intervall to get messages from.
        :param iden: Identifier for the stream
        :return: List of messages.
        """
        database = self.client[uid]
        database.authenticate(uid, token)
        begin = interval - time.time()
        end = time.time()

        collection = database['data_streams.' + str(iden)]
        items = collection.aggregate([
            {"$match": {"resv": {"$gt": begin, "$lte": end}}},
            {"$project": {"_id": 0, "body": 1}},
            {"$sort": {"resv": 1}}
        ])['result']

        return list(items)
dataset/ETHPy150Open tmetsch/suricate/suricate/data/streaming.py/StreamClient.get_messages/swapped operands of `-`