@staticmethod
def _get_measure_sample(original_df, attribute, measure):
    """
        Helper function for _get_statistical_significance() (via
        _calculate_significance() function). Convert dataframe to samples for
        given attribute group.

        :param original_df: a dataframe containing a required raw 'score' column
            and possible raw 'label_value' column.
        :param attribute: Attribute of interest in dataset (ex: race, sex, age
            category)
        :param measure: Metric of interest for which to calculate significance
            (false positives, false negatives, score, label_value)

        :return: A dictionary of binary 'samples' for each attribute group
        """
    return original_df.groupby(attribute).apply(lambda f: f.loc[f[measure].
        notnull(), measure].values.tolist()).to_dict()
