def METHOD_NAME(db_dir):
    try:
        import plyvel
    except:
        raise Exception("Please install the plyvel package via pip3.")
    try:
        return plyvel.DB(db_dir, create_if_missing=False)
    except plyvel._plyvel.IOError as e:
        logger.info(str(e))
        raise Exception("Ensure that bitcoind is stopped.")