def _has_bool_dtype(x):
    try:
        return x.dtype == bool
    except AttributeError:
        try:
            return 'bool' in x.blocks
        except __HOLE__:
            return isinstance(x, (bool, np.bool_))
dataset/ETHPy150Open pydata/pandas/pandas/computation/expressions.py/_has_bool_dtype