'Split a list into a list of sub lists, with the number of sub lists being
no more than the number of workers this server supports. Each sublist contains
2-tuples of the form (i, x) where x is an element from the original list
and i is the index of the element x in the original list.'

def split(self, tasks):

    (ans, count, pos) = ([], 0, 0)
    delta = int(ceil((len(tasks) / float(self.pool_size))))
    while (count < len(tasks)):
        section = []
        for t in tasks[pos:(pos + delta)]:
            section.append((count, t))
            count += 1
        ans.append(section)
        pos += delta
    return ans
