def bool_from_str(val):
    """Convert a string representation of a bool into a bool value"""

    if not val:
        return False
    try:
        return True if int(val) else False
    except __HOLE__:
        return val.lower() == 'true'
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/utils.py/bool_from_str