Returns a tuple with the following information:
        * total items in the queue
        * tasks from the given queue in the given state, latest first.

        An integer may be passed in the load_executions parameter to indicate
        how many executions should be loaded (starting from the latest).

def tasks_from_queue(self, tiger, queue, state, skip=0, limit=1000,
                   load_executions=0):
        """
        Returns a tuple with the following information:
        * total items in the queue
        * tasks from the given queue in the given state, latest first.

        An integer may be passed in the load_executions parameter to indicate
        how many executions should be loaded (starting from the latest).
        """

        key = tiger._key(state, queue)
        pipeline = tiger.connection.pipeline()
        pipeline.zcard(key)
        pipeline.zrange(key, -limit-skip, -1-skip, withscores=True)
        n, items = pipeline.execute()

        tasks = []

        if items:
            tss = [datetime.datetime.utcfromtimestamp(item[1]) for item in items]
            if load_executions:
                pipeline = tiger.connection.pipeline()
                pipeline.mget([tiger._key('task', item[0]) for item in items])
                for item in items:
                    pipeline.lrange(tiger._key('task', item[0], 'executions'), -load_executions, -1)
                results = pipeline.execute()

                for serialized_data, serialized_executions, ts in zip(results[0], results[1:], tss):
                    data = json.loads(serialized_data)
                    executions = [json.loads(e) for e in serialized_executions if e]

                    task = Task(tiger, queue=queue, _data=data, _state=state,
                                _ts=ts, _executions=executions)

                    tasks.append(task)
            else:
                data = tiger.connection.mget([tiger._key('task', item[0]) for item in items])
                for serialized_data, ts in zip(data, tss):
                    data = json.loads(serialized_data)
                    task = Task(tiger, queue=queue, _data=data, _state=state,
                                _ts=ts)
                    tasks.append(task)

        return n, tasks