def session(self):
        """ Create a new session based on the graph database details
        specified within this driver:

            >>> from neo4j.v1 import GraphDatabase
            >>> driver = GraphDatabase.driver("bolt://localhost")
            >>> session = driver.session()

        """
        session = None
        done = False
        while not done:
            try:
                session = self.session_pool.pop()
            except __HOLE__:
                session = Session(self)
                done = True
            else:
                if session.healthy:
                    session.connection.reset()
                    done = session.healthy
        return session
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/packages/neo4j/v1/session.py/Driver.session