def __getstate__(self):
        try:
            #remove unpicklable callback
            self.mle_settings['callback'] = None
        except (__HOLE__, KeyError):
            pass
        return self.__dict__
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/discrete/discrete_model.py/DiscreteResults.__getstate__