def validate_bool_kwarg(value, arg_name):
if not (is_bool(value) or value is None):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(arg=arg_name,<EOL>typ=type(value).__name__))<EOL><DEDENT>return value<EOL>
Ensures that argument passed in arg_name is of type bool.