code: def test_where_invalid_input(cond):
      # see gh-15414: only boolean arrays accepted
      s = Series([1, 2, 3])
      msg = "Boolean array expected for the condition"
  
      with pytest.raises(TypeError, match=msg):
          s.where(cond)
  
      msg = "Array conditional must be same shape as self"
      with pytest.raises(ValueError, match=msg):
          s.where([True])
  
imports: import numpy
  import pytest
  from pandas._config import using_pyarrow_string_dtype
  from pandas.core.dtypes.common import is_integer
  import pandas
  from pandas import Series, Timestamp, date_range, isna
  import pandas._testing
label_desc: Use image node_id 8 for calling a global function with example usage: test_where_invalid_input(cond) without return types