def METHOD_NAME(self, params, neg_ll):
    params_stacked = np.stack(params.values())
    coef_penalty = 0
    if self.penalizer > 0:
        for i in range(params_stacked.shape[1]):
            if not self._cols_to_not_penalize[i]:
                coef_penalty = coef_penalty + (params_stacked[:, i]).var()
    return neg_ll + self.penalizer * coef_penalty