code: def _bool_arith_check(op, a: np.ndarray, b) -> None:
      """
      In contrast to numpy, pandas raises an error for certain operations
      with booleans.
      """
      if op in _BOOL_OP_NOT_ALLOWED:
          if a.dtype.kind == "b" and (
              is_bool_dtype(b) or lib.is_bool(b)
          ):
              op_name = op.__name__.strip("_").lstrip("r")
              raise NotImplementedError(
                  f"operator '{op_name}' not implemented for bool dtypes"
              )
  
imports: from __future__ import annotations
  import datetime
  from functools import partial
  import operator
  from typing import TYPE_CHECKING, Any
  import warnings
  import numpy
  from pandas._libs import NaT, Timedelta, Timestamp, lib, ops
  from pandas._libs.tslibs import BaseOffset, get_supported_dtype, is_supported_dtype, is_unitless
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike, find_common_type
  from pandas.core.dtypes.common import ensure_object, is_bool_dtype, is_list_like, is_numeric_v_string_like, is_object_dtype, is_scalar
  from pandas.core.dtypes.generic import ABCExtensionArray, ABCIndex, ABCSeries
  from pandas.core.dtypes.missing import isna, notna
  from pandas.core import roperator
  from pandas.core.computation import expressions
  from pandas.core.construction import ensure_wrapped_if_datetimelike
  from pandas.core.ops import missing
  from pandas.core.ops.dispatch import should_extension_dispatch
  from pandas.core.ops.invalid import invalid_comparison
label_desc: Use image node_id 11 for calling a global function with example usage: _bool_arith_check(op, a, b) without return types