code: def test_periods_feature(freq):
      if freq != "S" and freq.endswith("S"):
          pytest.skip()
  
      pr = pd.period_range(start="2020", freq=freq, periods=20)
      ps = zb.periods("2020", freq, 20)
  
      np.testing.assert_array_equal(pr.start_time.year, ps.year)
      np.testing.assert_array_equal(pr.start_time.month, ps.month)
      np.testing.assert_array_equal(pr.start_time.day, ps.day)
  
      np.testing.assert_array_equal(pr.start_time.hour, ps.hour)
      np.testing.assert_array_equal(pr.start_time.minute, ps.minute)
      np.testing.assert_array_equal(pr.start_time.second, ps.second)
  
      np.testing.assert_array_equal(
          pr.start_time.dayofweek, ps.dayofweek
      )
      np.testing.assert_array_equal(
          pr.start_time.dayofyear, ps.dayofyear
      )
      np.testing.assert_array_equal(
          pr.start_time.isocalendar().week, ps.week
      )
  
file_path: gluonts/test/zebras/test_period.py
imports: import pytest
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from gluonts.core import serde
  import gluonts.zebras
label_desc: Use image node_id 7 for calling a global function with example usage: test_periods_feature(freq) without return types