def bet_sizing_coherence(df_line, matrix_len):
    """
    Evaluates the bet sizing coherence of an altered Kelly DataFrame (doubled columns with shifted values).

    This method was made to be used on a DataFrame with '.apply()'.

    :param df_line: (pandas Series) which is a horizontal line of an altered Kelly DataFrame
    :param matrix_len: (int) original Kelly DataFrame length

    :return: returns a coherent bet sizing line
    :rtype: pandas Series
    """
    for i in range(0, matrix_len):
        if df_line.values[i] > df_line.values[i + matrix_len]:
            df_line.values[i] = df_line.values[i + matrix_len]
        if i > 0:
            if df_line.values[i - 1] > df_line.values[i]:
                df_line.values[i - 1] = df_line.values[i]
    return df_line
