def _apply_none_label(values, preds, none_label_id, threshold, entropy=True):
    """
        As no explanation will ever be written about a label that depicts null/none/neutral, if a label_space
        does have such a label we apply a thresholding technique to the current label_space to determine
        when the output should be the null/none/neutral label.

        We support two strategies:
            if entropy across label probabilities for an instance > threshold, then apply null/none/neutral label
            if max probability value for a label < threshold, then apply null/none/neutral label
        
        Note: Even if no null/none/neutral label exists, we still apply this threshold technique, but we choose
              impossible thresholds so we never label anything as the fake "none_label_id"
        
        Arguments:
            values        (arr) : array of floats, either entropy values or max probability value
            preds         (arr) : predicted labels
            none_label_id (int) : the id of the null/neutral/none label
            threshold   (float) : threshold to apply
            entropy      (bool) : boolean indicating whether to use entropy strategy or not
        
        Returns:
            arr : array of final predicted labels
    """
    if entropy:
        none_label_mask = values > threshold
    else:
        none_label_mask = values < threshold

    final_preds = [none_label_id if mask else preds[i] for i, mask in enumerate(none_label_mask)]

    return final_preds