def __new__(cls, *uris, **settings):
        database = settings.pop("database", "data")
        address = register_server(*uris, **settings)
        key = (cls, address, database)
        try:
            inst = cls.__instances[key]
        except __HOLE__:
            inst = super(Graph, cls).__new__(cls)
            inst.address = address
            inst.__remote__ = Resource(address.http_uri("/db/%s/" % database))
            inst.transaction_uri = Resource(address.http_uri("/db/%s/transaction" % database)).uri.string
            inst.transaction_class = HTTPTransaction
            use_bolt = address.bolt
            if use_bolt is None:
                use_bolt = version_tuple(inst.__remote__.get().content["neo4j_version"]) >= (3,)
            if use_bolt:
                auth = get_auth(address)
                inst.driver = GraphDatabase.driver(address.bolt_uri("/"),
                                                   auth=None if auth is None else auth.bolt_auth_token,
                                                   encypted=address.secure,
                                                   user_agent="/".join(PRODUCT))
                inst.transaction_class = BoltTransaction
            cls.__instances[key] = inst
        return inst
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/database/__init__.py/Graph.__new__