def _try_boolean(x):
    try:
        x = x.lower()
        if x in ('true', 'yes'):
            return True
        elif x in ('false', 'no'):
            return False
        return x
    except (ValueError, __HOLE__):
        return x
dataset/ETHPy150Open cloudera/ibis/ibis/impala/metadata.py/_try_boolean