def get_state(self):
        """Get state of client's specific application instance.

        The client's IP address is used for identity purposes.
        If there is a session associated with the client, the
        session's state is returned for further processing.
        Otherwise, a new session is created with a new state
        object being added to it, and the new state is returned."""
        ip = self.client_address[0]
        with self.SM:
            if ip in self.SM:
                session = self.SM[ip]
            else:
                # Sessions may live for up to 24 hours.
                session = manager.Session(86400)
                session.state = State(session, self.LIBRARY, self.BIB_SVR)
                session.ip = ip
                self.SM[ip] = session
        return session.state
Get state of client's specific application instance.

        The client's IP address is used for identity purposes.
        If there is a session associated with the client, the
        session's state is returned for further processing.
        Otherwise, a new session is created with a new state
        object being added to it, and the new state is returned.
recipes/Python/577043_Bible_Verse_Quiz__VerseMatchpy/recipe-577043.py