def restore_vals(tmp_params, params):
    """Restore values and stderrs of parameters from a temporary dictionary."""
    for para_key in params:
        params[para_key].value, params[para_key].stderr = tmp_params[para_key]
