original_docstring: Provide a transactional scope around a series of operations.
docstring: Provide a transactional scope around a series of operations.
docstring_tokens: Provide a transactional scope around a series of operations .
code: def session_scope():
      """Provide a transactional scope around a series of operations."""
      engine = create_engine(Database_Location)
      Base.metadata.Bind = engine
      DBSession = sessionmaker(bind=engine)
      session = DBSession()
      try:
          yield session
          session.commit()
      except:
          session.rollback()
          raise
      finally:
          session.close()
code_tokens: def session_scope ( ) : engine = create_engine ( Database_Location ) Base . metadata . Bind = engine DBSession = sessionmaker ( bind = engine ) session = DBSession ( ) try : yield session session . commit ( ) except : session . rollback ( ) raise finally : session . close ( )
short_docstring: Provide a transactional scope around a series of operations.
short_docstring_tokens: Provide a transactional scope around a series of operations .
comment: """Provide a transactional scope around a series of operations."""