def interpolate_parameters(initial_params, final_params, nb_steps=10, include_final=True):
    """Given a list of initial and final parameters, linearly interpolated between them."""
    step_params = (final_params - initial_params) / nb_steps

    if include_final:
        nb_param_sets = nb_steps + 1
    else:
        nb_param_sets = nb_steps

    params_list = []
    for idx in range(nb_param_sets):
        curr_params = initial_params + step_params * idx
        params_list.append(curr_params)
    return params_list