def get_expired_tasks(self, key_prefix, time, batch_size, client=None):
        """
        Returns a list of expired tasks (older than ``time``) by looking at all
        active queues. The list is capped at ``batch_size``. The list contains
        tuples (queue, task_id).
        """
        result = self._get_expired_tasks(args=[key_prefix, time, batch_size],
                                         client=client)

        # [queue1, task1, queue2, task2] -> [(queue1, task1), (queue2, task2)]
        return list(zip(result[::2], result[1::2]))