def METHOD_NAME(db_path):
    global g_db
    if USE_KYOTO:
        g_db = kyotocabinet.DB()
        if not g_db.open(db_path,
                         kyotocabinet.DB.OWRITER | kyotocabinet.DB.OCREATE):
            sys.stderr.write("open error: " + str(g_db.error()))
            sys.exit(1)
    else:
        # BRCv3 max size = 49152 (8192*3*2), so let's increase block size.
        # LevelDB default I/O buffer size: R=8M, W=2M.
        db = leveldb.LevelDB(db_path,
                #block_size=49152,
                # block_cache_size=(16 * (2 << 20)),
                write_buffer_size=(32 * (2 << 20)),
                )
        class LevelDBWrapper(object):
            def __init__(self, db):
                self.db = db
            def get(self, key):
                try:
                    return self.db.Get(key)
                except KeyError:
                    return None
            def set(self, key, value):
                self.db.Put(key, value)
        g_db = LevelDBWrapper(db)