def is_valid_operand_for_numeric_arithmetic(operand: Any, *, allow_bool: bool=True) -> bool:
    'Check whether the `operand` is valid for arithmetic operations against numerics.'
    from pyspark.pandas.base import IndexOpsMixin
    if isinstance(operand, numbers.Number):
        return ((not isinstance(operand, bool)) or allow_bool)
    elif isinstance(operand, IndexOpsMixin):
        if isinstance(operand.dtype, CategoricalDtype):
            return False
        else:
            return (isinstance(operand.spark.data_type, NumericType) or (allow_bool and isinstance(operand.spark.data_type, BooleanType)))
    else:
        return False
Check whether the `operand` is valid for arithmetic operations against numerics.
def is_valid_operand_for_numeric_arithmetic(operand: Any, *, allow_bool: bool=True) -> bool:
    
    from pyspark.pandas.base import IndexOpsMixin
    if isinstance(operand, numbers.Number):
        return ((not isinstance(operand, bool)) or allow_bool)
    elif isinstance(operand, IndexOpsMixin):
        if isinstance(operand.dtype, CategoricalDtype):
            return False
        else:
            return (isinstance(operand.spark.data_type, NumericType) or (allow_bool and isinstance(operand.spark.data_type, BooleanType)))
    else:
        return False