code: def state_listener(self, state):
          '''
          Restarts the session if we get anything besides CONNECTED
          '''
          if state == KazooState.SUSPENDED:
              self.set_valid(False)
              self.call_error(self.BAD_CONNECTION)
          elif state == KazooState.LOST and not self.do_not_restart:
              self.threaded_start()
          elif state == KazooState.CONNECTED:
              # This is going to throw a SUSPENDED kazoo error
              # which will cause the sessions to be wiped and re established.
              # Used b/c of massive connection pool issues
              self.zoo_client.stop(f state_listener(self, state):
          '''
          Restarts the session if we get anything besides CONNECTED
          '''
          if state == KazooState.SUSPENDED:
              self.set_valid(False)
              self.call_error(self.BAD_CONNECTION)
          elif state == KazooState.LOST and not self.do_not_restart:
              self.threaded_start()
          elif state == KazooState.CONNECTED:
              # This is going to throw a SUSPENDED kazoo error
              # which will cause the sessions to be wiped and re established.
              # Used b/c of massive connection pool issues
              self.zoo_client.stop()
docs: Restarts the session if we get anything besides CONNECTED