    def get_state(self):
        """Save state that is needed to restore this spawner instance after a hub restore.

        Local processes only need the process id.
        """
        state = super().get_state()
        if self.pid:
            state['pid'] = self.pid
        return state
Save state that is needed to restore this spawner instance after a hub restore.

Local processes only need the process id.
jupyterhub/spawner.py