code: def test_compare_str(_offset):
      # GH#23524
      # comparing to strings that cannot be cast to DateOffsets should
      #  not raise for __eq__ or __ne__
      off = _get_offset(_offset)
  
      assert not off == "infer"
      assert off != "foo"
  
file_path: pandas/pandas/tests/tseries/offsets/test_common.py
imports: from datetime import datetime
  from dateutil.tz.tz import tzlocal
  import pytest
  from pandas._libs.tslibs import OutOfBoundsDatetime, Timestamp
  from pandas.compat import IS64, is_platform_windows
  from pandas.tseries.offsets import FY5253, BDay, BMonthBegin, BMonthEnd, BQuarterBegin, BQuarterEnd, BusinessHour, BYearBegin, BYearEnd, CBMonthBegin, CBMonthEnd, CDay, CustomBusinessHour, DateOffset, FY5253Quarter, LastWeekOfMonth, MonthBegin, MonthEnd, QuarterEnd, SemiMonthBegin, SemiMonthEnd, Week, WeekOfMonth, YearBegin, YearEnd
label_desc: Use image node_id 9 for calling a global function with example usage: test_compare_str(_offset) without return types