def METHOD_NAME(db_str="sqlite:///:memory:"):
    try:
        engine = create_engine(db_str)
        Base.metadata.create_all(engine)
        Session = sessionmaker(bind=engine)
        yield Session
    except DatabaseError:
        raise AngrCorruptDBError("The target file may not be an angr database or it is corrupted.")
    except Exception as ex:
        raise AngrDBError(str(ex))