code: def test_where_ndframe_align():
      msg = "Array conditional must be same shape as self"
      s = Series([1, 2, 3])
  
      cond = [True]
      with pytest.raises(ValueError, match=msg):
          s.where(cond)
  
      expected = Series([1, np.nan, np.nan])
  
      out = s.where(Series(cond))
      tm.assert_series_equal(out, expected)
  
      cond = np.array([False, True, False, True])
      with pytest.raises(ValueError, match=msg):
          s.where(cond)
  
      expected = Series([np.nan, 2, np.nan])
  
      out = s.where(Series(cond))
      tm.assert_series_equal(out, expected)
  
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 9 for calling a global function with example usage: test_where_ndframe_align() without return types