def _check_bool(dummy_option, opt, value):
    if value.isdigit():
        return int(value, 10) != 0
    elif value.lower() == "false":
        return False
    elif value.lower() == "true":
        return True
    else:
        raise OptionValueError("option {0:s}: invalid boolean value: {1:s}.".format(opt, value))


# Class MyOption
###############################################################################
Checks if a value is given as a boolean value (either 0 or 1 or "true" or "false")
dataset/ETHPy150Open tpircher/pycrc/crc_opt.py/_check_bool