def is_feature_not_present_across_class(feature_size_by_class_df):
    """
    Helper function to see whether all subsections in `feature_size_by_class_df`, 
    based on slicing with different values in first-level rwo index, have same 
    number of values in second-level row index.

    Note that `feature_size_by_class_df` then must obviously have at least two 
    row-index levels.

    The intended use case is for handling results from `get_feature_size_by_class`,
    where first-level row index corresponds to class values, and second-level
    row index corresponds to feature values.

    The idea is to confirm that all feature values are present across all class 
    values. If this is not true, feature is either highly predictive or leaking
    data.

    Feature in `feature_size_by_class_df` should be discrete, i.e. of a finite 
    set of values.

    Parameters
    ----------

    feature_size_by_class_df : pandas.DataFrame
        DataFrame on which this function will operate, which must have at least
        two row-index levels.

    Return
    ------

    `bool` indicating whether all class values see all feature values.
    """
    index_vals = feature_size_by_class_df.reset_index().iloc[:, :2]
    counts = index_vals.groupby(index_vals.columns[0]).size()
    return counts.nunique() != 1 or counts.index.nunique(
        ) != feature_size_by_class_df.index.levels[0].nunique()
