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
    """
    # Iterates row by row on the original Kelly DataFrame
    for i in range(0, matrix_len):
        # Check if current row has greater value than row below
        if df_line.values[i] > df_line.values[i + matrix_len]:
            # If it has, caps its value
            df_line.values[i] = df_line.values[i + matrix_len]
        if i > 0:
            # Check if row 'i-1' has greater value than row on the right
            if df_line.values[i - 1] > df_line.values[i]:
                # If it has, caps its value
                df_line.values[i - 1] = df_line.values[i]

    # Returns a coherent bet sizing line
    return df_line