code: def test_pivot_sp_consistent(
      sp, index_type, n_timepoints, anchor_side
  ):
      """Test _pivot_sp consistency between offsets."""
      df = _make_series(
          n_timepoints=n_timepoints,
          n_columns=1,
          index_type=index_type,
          return_mtype="pd.DataFrame",
      )
      df2 = df.iloc[1:]
  
      df_pivot = _pivot_sp(df, sp, anchor_side=anchor_side)
      df2_pivot = _pivot_sp(df2, sp, anchor=df, anchor_side=anchor_side)
  
      assert np.all(df_pivot.index == df2_pivot.index)
  
      df_pivot_values = df_pivot.values.flatten()
      df_pivot_values = df_pivot_values[~np.isnan(df_pivot_values)]
      df2_pivot_values = df2_pivot.values.flatten()
      df2_pivot_values = df2_pivot_values[~np.isnan(df2_pivot_values)]
      assert np.all(df_pivot_values[1:] == df2_pivot_values)
  
file_path: sktime/sktime/utils/tests/test_seasonal.py
imports: from math import ceil
  import numpy
  import pandas
  import pytest
  from sktime.utils._testing.series import _make_series
  from sktime.utils.seasonality import _pivot_sp, _unpivot_sp
label_desc: Use image node_id 3 for calling a global function with example usage: test_pivot_sp_consistent(sp, index_type, n_timepoints, anchor_side) without return types