code: def test_sequence_stroll_indexing_segment_end_idxs_outside_valid_range():
      segment_end_idxs = np.array([3, 5, 7, 10, 200])
      s = pd.Series(data=np.arange(20), name="dummy")
  
      ## No Force
      sr = SequenceStridedRolling(
          s,
          window=3,
          segment_end_idxs=segment_end_idxs,
          window_idx="end",
      )
      assert sr.strides is None
      assert np.all(sr.index == segment_end_idxs)
  
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[3, 5],
          segment_end_idxs=segment_end_idxs,
          window_idx="end",
      )
      assert sr.strides is None
      assert np.all(sr.index == segment_end_idxs)
  
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[3, 5],
          segment_end_idxs=segment_end_idxs,
          window_idx="begin",
      )
      assert sr.strides is None
      assert np.all(sr.index == segment_end_idxs - 3)
  
      ## Force
      sr = SequenceStridedRolling(
          s,
          window=3,
          segment_end_idxs=segment_end_idxs,
          window_idx="end",
          include_final_window=True,
      )
      assert sr.strides is None
      assert np.all(sr.index == segment_end_idxs)
  
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[3, 5],
          segment_end_idxs=segment_end_idxs,
          window_idx="end",
          include_final_window=True,
      )
      assert sr.strides is None
      assert np.all(sr.index == segment_end_idxs)
  
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[3, 5],
          segment_end_idxs=segment_end_idxs,
          window_idx="begin",
          include_final_window=True,
      )
      assert sr.strides is None
      assert np.all(sr.index == segment_end_idxs - 3)
  
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 14 for calling a global function with example usage: test_sequence_stroll_indexing_segment_end_idxs_outside_valid_range() without return types