def pipeline(names, steps):
    """Reconstruct a Pipeline from names and steps"""
    steps, times = zip(*map(_maybe_timed, steps))
    fit_time = sum(times)
    if any(s is FIT_FAILURE for s in steps):
        fit_est = FIT_FAILURE
    else:
        fit_est = Pipeline(list(zip(names, steps)))
    return fit_est, fit_time
Reconstruct a Pipeline from names and steps