code: def test_case_when_raise_error_from_mask(df):
      """
      Raise Error from within Series.mask
      """
      msg = "Failed to apply condition0 and replacement0."
      with pytest.raises(ValueError, match=msg):
          df["a"].case_when([(df["a"].eq(1), [1, 2])])
  
file_path: pandas/pandas/tests/series/methods/test_case_when.py
imports: import numpy
  import pytest
  from pandas import DataFrame, Series, array, date_range
  import pandas._testing
label_desc: Use image node_id 5 for calling a global function with example usage: test_case_when_raise_error_from_mask(df) without return types