def __getstate__(self):
        state_dict = self.__dict__.copy()
        if isinstance(state_dict['log_config'], cp.RawConfigParser):
            # Config Parsers are not guaranteed to be picklable
            state_dict['log_config'] = True
        return state_dict
ConfigParsers are not guaranteed to be picklable so we need to remove these.
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/pypetlogging.py/LoggingManager.__getstate__