code: def validate_bool_kwarg(value, arg_name):
      """Ensures that argument passed in arg_name is of type bool."""
      if not (is_bool(value) or value is None):
          raise ValueError(
              'For argument "{arg}" expected type bool, received '
              "type {typ}.".format(
                  arg=arg_name, typ=type(value).__name__
              )
          )
      return value
  
file_path: catboost/contrib/python/pandas/py2/pandas/util/_validators.py
imports: import warnings
  from pandas.core.dtypes.common import is_bool
label_desc: Use image node_id 7 for calling a global function with example usage: validate_bool_kwarg(value, arg_name) and returns: value