def _is_boolean_type(right: Any) -> bool:
    from pyspark.pandas.base import IndexOpsMixin
    return (isinstance(right, bool) or (isinstance(right, IndexOpsMixin) and isinstance(right.spark.data_type, BooleanType)))
def _is_boolean_type(right: Any) -> bool:
    from pyspark.pandas.base import IndexOpsMixin
    return (isinstance(right, bool) or (isinstance(right, IndexOpsMixin) and isinstance(right.spark.data_type, BooleanType)))