def post_spawn_stop(self, user, spawner):
        if not self.open_sessions:
            return
        try:
            pamela.close_session(user.name, service=self.service)
        except pamela.PAMError as e:
            self.log.warning("Failed to close PAM session for %s: %s", user.name, e)
            self.log.warning("Disabling PAM sessions from now on.")
            self.open_sessions = False
Close PAM session for user
dataset/ETHPy150Open jupyterhub/jupyterhub/jupyterhub/auth.py/PAMAuthenticator.post_spawn_stop