def check_blast_db(option, opt, value):
    db_dir, db_name = split(abspath(value))
    if not exists(db_dir):
        raise OptionValueError(
            "option %s: path does not exists: %r" % (opt, db_dir))
    elif not isdir(db_dir):
        raise OptionValueError(
            "option %s: not a directory: %r" % (opt, db_dir))
    return value
dataset/ETHPy150Open biocore/pyqi/pyqi/core/interfaces/optparse/__init__.py/check_blast_db/original