def _create_session(self, mode, bind=None):
        if not self._started:
            self._start()
        kw = {}
        # don't pass 'bind' if bind is None; the sessionmaker
        # already has a bind to the engine.
        if bind:
            kw['bind'] = bind
        if mode is _WRITER:
            return self._writer_maker(**kw)
        elif self.synchronous_reader or mode is not _ASYNC_READER:
            return self._reader_maker(**kw)
        else:
            return self._writer_maker(**kw)
dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py/_TransactionFactory._create_session/operator `is` -> `is not`