def _normalize(df, col, start_values, target_values):
    """Normalize the values in **col** relative to the total possible improvement.

    We normalize the values of **col** by calculating the share of the distance between
    the start and target values that is still missing.

    Note: This is correct whether we have a minimization or a maximization problem
    because in the case of a maximization both the sign of the numerator and denominator
    in the line where normalized is defined would be switched, i.e. that cancels out.
    (In the case of a maximization the total improvement would be target - start values
    and the currently still missing improvement would be target - current values)

    Args:
        df (pandas.DataFrame): contains the columns **col** and "problem".
        col (str): name of the column to normalize
        start_values (pandas.Series): index are problems, values are start values
        target_values (pandas.Series): index are problems, values are target values.

    Returns:
        pandas.Series: index is the same as that of sr. The lower the value the closer
            the current value is to the target value. 0 means the target value has been
            reached. 1 means the current value is as far from the target value as the
            start value.

    """
    # expand start and target values to the length of the full DataFrame
    start_values = df["problem"].map(start_values)
    target_values = df["problem"].map(target_values)

    normalized = (df[col] - target_values) / (start_values - target_values)
    return normalized