code: def test_both_offset_observance_raises():
      # see gh-10217
      msg = "Cannot use both offset and observance"
      with pytest.raises(NotImplementedError, match=msg):
          Holiday(
              "Cyber Monday",
              month=11,
              day=1,
              offset=[DateOffset(weekday=SA(4))],
              observance=next_monday,
          )
  
file_path: pandas/pandas/tests/tseries/holiday/test_holiday.py
imports: from datetime import datetime
  import pytest
  from pytz import utc
  from pandas import DatetimeIndex, Series
  import pandas._testing
  from pandas.tseries.holiday import MO, SA, AbstractHolidayCalendar, DateOffset, EasterMonday, GoodFriday, Holiday, HolidayCalendarFactory, Timestamp, USColumbusDay, USFederalHolidayCalendar, USLaborDay, USMartinLutherKingJr, USMemorialDay, USPresidentsDay, USThanksgivingDay, get_calendar, next_monday
label_desc: Use image node_id 7 for calling a global function with example usage: test_both_offset_observance_raises() without return types