old_contents: from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import sessionmaker
  
  Base = declarative_base()
  Session = sessionmaker()
  
new_contents: from contextlib import contextmanager
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import sessionmaker
  
  Base = declarative_base()
  Session = sessionmaker()
  
  
  @contextmanager
  def sessionScope():
      session = Session()
      try:
          yield session
          session.commit()
      except:
          session.rollback()
          raise
      finally:
          session.close()
  
subject: Add context manager for easier database handling