def compute(params):
    """
    Wrapper method to call Timeline.sample used by multiprocessing.Pool.

    :param params: (timeline, number of scenarios, timeline name)
    :return: (name, sampling)
    """
    tl, nb, name = params
    return name, tl.sample(nb)