code: def test_indexing_unordered2():
      # diff freq
      rng = date_range(datetime(2005, 1, 1), periods=20, freq="ME")
      ts = Series(np.arange(len(rng)), index=rng)
      ts = ts.take(np.random.default_rng(2).permutation(20))
  
      result = ts["2005"]
      for t in result.index:
          assert t.year == 2005
  
imports: from datetime import datetime, timedelta
  import re
  from dateutil.tz import gettz, tzutc
  import numpy
  import pytest
  import pytz
  from pandas._libs import index
  import pandas
  from pandas import DataFrame, Series, Timestamp, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 11 for calling a global function with example usage: test_indexing_unordered2() without return types