code: def test_time_stroll_indexing_segment_start_idxs():
      s = pd.Series(data=np.arange(20), name="dummy")
      time_index = pd.date_range("2020-01-01", freq="1h", periods=20)
      s.index = time_index
  
      segment_start_idxs = s.index[[0, 5, 7, 10]].values
  
      def get_time_index(arr):
          return [time_index[idx] for idx in arr]
  
      ## No Force
      sr = TimeStridedRolling(
          s,
          window=pd.Timedelta(3, unit="h"),
          segment_start_idxs=segment_start_idxs,
          window_idx="begin",
      )
      assert sr.strides is None
      assert np.all(sr.index == get_time_index([0, 5, 7, 10]))
  
      sr = TimeStridedRolling(
          s,
          window=pd.Timedelta(3, unit="h"),
          strides=[
              pd.Timedelta(3, unit="h"),
              pd.Timedelta(5, unit="h"),
          ],
          segment_start_idxs=segment_start_idxs,
          window_idx="begin",
      )
      assert sr.strides is None
      assert np.all(sr.index == get_time_index([0, 5, 7, 10]))
  
      sr = TimeStridedRolling(
          s,
          window=pd.Timedelta(3, unit="h"),
          strides=[
              pd.Timedelta(3, unit="h"),
              pd.Timedelta(5, unit="h"),
          ],
          segment_start_idxs=segment_start_idxs,
          window_idx="end",
      )
      assert sr.strides is None
      assert np.all(
          sr.index
          == [
              t + pd.Timedelta(3, unit="h")
              for t in get_time_index([0, 5, 7, 10])
          ]
      )
  
      ## No Force
      sr = TimeStridedRolling(
          s,
          window=pd.Timedelta(3, unit="h"),
          segment_start_idxs=segment_start_idxs,
          window_idx="begin",
          include_final_window=True,
      )
      assert sr.strides is None
      assert np.all(sr.index == get_time_index([0, 5, 7, 10]))
  
      sr = TimeStridedRolling(
          s,
          window=pd.Timedelta(3, unit="h"),
          strides=[
              pd.Timedelta(3, unit="h"),
              pd.Timedelta(5, unit="h"),
          ],
          segment_start_idxs=segment_start_idxs,
          window_idx="begin",
          include_final_window=True,
      )
      assert sr.strides is None
      assert np.all(sr.index == get_time_index([0, 5, 7, 10]))
  
      sr = TimeStridedRolling(
          s,
          window=pd.Timedelta(3, unit="h"),
          strides=[
              pd.Timedelta(3, unit="h"),
              pd.Timedelta(5, unit="h"),
          ],
          segment_start_idxs=segment_start_idxs,
          window_idx="end",
          include_final_window=True,
      )
      assert sr.strides is None
      assert np.all(
          sr.index
          == [
              t + pd.Timedelta(3, unit="h")
              for t in get_time_index([0, 5, 7, 10])
          ]
      )
  
imports: import numpy
  import pandas
  import pytest
  from tsflex.features import FuncWrapper
  from tsflex.features.segmenter.strided_rolling import SequenceStridedRolling, StridedRolling, TimeIndexSampleStridedRolling, TimeStridedRolling
  from .utils import dummy_data
label_desc: Use image node_id 15 for calling a global function with example usage: test_time_stroll_indexing_segment_start_idxs() and returns: unknown