def excess_missing_data_flagger_and_cutter(df, useful_cols,
    nan_fraction_threshold=0.15, cutter=True):
    """
    Function calculates `null_count_density` (number of missing values for each feature as a fraction of the /
    number of samples), and, if specified, culls these from the input dataframe (inplace)
    
    Parameters
    ----------
    df : pandas.DataFrame
        Desired features
    useful_cols : pandas.DataFrame
        Lookup table detailing desired features
    nan_fraction_threshold : int
        Threshold for fraction of samples with missing values (for a given feature) above which the feature is deemed unacceptable
    cutter : bool
        If true [default], df is modified to remove features with an unacceptably large fraction of missing values
    
    Returns
    -------
    null_counts : pandas.Series
        Record of number of missing values for each feature
    null_count_density : pandas.Series
        Record of number of missing values for each feature as fraction of number of samples
    excess_null_count : list
        List of features where the null count density exceeds `nan_fraction_threshold`
    useful_cols : pandas.DataFrame
        Returned unchanged if `cutter` == False, else the clipped features are removed
    """
    null_counts = df.isna().sum()
    null_count_density = null_counts / df.shape[0]
    excess_null_count = null_count_density[null_count_density >
        nan_fraction_threshold]
    excess_null_count = list(null_count_density[null_count_density >
        nan_fraction_threshold].index)
    if cutter == True and len(excess_null_count) > 0:
        print(
            f'Following features dropped for having a null count density greater than {nan_fraction_threshold}: {excess_null_count} and have been dropped'
            )
        df.drop(excess_null_count, axis=1, inplace=True)
        useful_cols = useful_cols.loc[(~useful_cols.feature.isin(
            excess_null_count)), :]
    return null_counts, null_count_density, excess_null_count, useful_cols
