def __getstate__(self):
        state_dict = super(HasLogger, self).__getstate__()
        if '_logger' in state_dict:
            # Pickling does not work with loggers objects, so we just keep the logger's name:
            state_dict['_logger'] = self._logger.name
        return state_dict
Called for pickling.
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/pypetlogging.py/HasLogger.__getstate__