class_docstr: Custom time-based sliding window with stride.
  
  Parameters
  ----------
  data : Union[pd.Series, pd.DataFrame, List[Union[pd.Series, pd.DataFrame]]]
      ``pd.Series`` or ``pd.DataFrame`` to slide over, the index must be either
      numeric or a ``pd.DatetimeIndex``.
  window : Union[float, pd.Timedelta]
      Either an int, float, or ``pd.Timedelta``, representing the sliding window size
      in terms of the index (in case of a int or float) or the sliding window duration
      (in case of ``pd.Timedelta``).
  strides : Union[float, pd.Timedelta, List[Union[float, pd.Timedelta]]], optional
      Either a list of int, float, or ``pd.Timedelta``, representing the stride sizes
      in terms of the index (in case of a int or float) or the stride duration (in
      case of ``pd.Timedelta``). By default None.
  segment_start_idxs: np.ndarray, optional
      The start indices for the segmented windows. If not provided, the start indices
      will be computed from the data using the passed ``strides`` or by using the
      ``segment_end_idxs`` (if not none) + ``window``. By default None.
  segment_end_idxs: np.ndarray, optional
      The end indices for the segmented windows. If not provided, the end indices will
      be computed from either (1) the data using the passed ``window`` + ``strides``
      or (2) the ``segment_start_idxs`` + ``window``, By default None.
      .. Note::
          When you pass arrays to both ``segment_start_idxs`` and
          ``segment_end_idxs``, the corresponding index-values of these arrays will be
          used as segment-ranges. As a result, the following properties must be met:
  
            - both arrays should have equal length
            - all values in ``segment_start_idxs`` should be <= ``segment_end_idxs``
  start_idx: Union[float, pd.Timestamp], optional
      The start-index which will be used for each series passed to `data`. This is
      especially useful if multiple ``StridedRolling`` instances are created and the
      user want to ensure same (start-)indexes for each of them.
  end_idx: Union[float, pd.Timestamp], optional
      The end-index which will be used as sliding end-limit for each series passed to
      `data`.
  func_data_type: Union[np.array, pd.Series], optional
      The data type of the stroll (either np.array or pd.Series), by default np.array.
      <br>
      .. Note::
          Make sure to only set this argument to pd.Series when this is really
          required, since pd.Series strided-rolling is significantly less efficient.
          For a np.array it is possible to create very efficient views, but there is
          no such thing as a pd.Series view. Thus, for each stroll, a new series is
          created, inducing a lot of non-feature calculation of overhead.
  window_idx : str, optional
      The window's index position which will be used as index for the
      feature_window aggregation. Must be either of: `["begin", "middle", "end"]`, by
      default "end".
  include_final_window: bool, optional
      Whether the final (possibly incomplete) window should be included in the
      strided-window segmentation, by default False.
  
      .. Note::
          The remarks below apply when ``include_final_window`` is set to True.
          The user should be aware that the last window *might* be incomplete, i.e.;
  
          - when equally sampled, the last window *might* be smaller than the
            the other windows.
          - when not equally sampled, the last window *might* not include all the
              data points (as the begin-time + window-size comes after the last data
              point).
  
          Note, that when equally sampled, the last window *will* be a full window
          when:
  
          - the stride is the sampling rate of the data (or stride = 1 for
            sample-based configurations).<br>
            **Remark**: that when `include_final_window` is set to False, the last
            window (which is a full) window will not be included!
          - *(len * sampling_rate - window_size) % stride = 0*. Remark that the above
            case is a base case of this.
  approve_sparsity: bool, optional
      Bool indicating whether the user acknowledges that there may be sparsity (i.e.,
      irregularly sampled data), by default False.
      If False and sparsity is observed, a warning is raised.
  
  Notes
  -----
  * This instance withholds a **read-only**-view of the data its values.
class_docstr_tok: ["Custom","time-based","sliding","window","with","stride",".","Parameters","--","--","--","--","--","data",":","Union","[","pd.Series",",","pd.DataFrame",",","List","[","Union","[","pd.Series",",","pd.DataFrame","]","]","]","``","pd.Series","``","or","``","pd.DataFrame","``","to","slide","over",",","the","index","must","be","either","numeric","or","a","``","pd.DatetimeIndex","``",".","window",":","Union","[","float",",","pd.Timedelta","]","Either","an","int",",","float",",","or","``","pd.Timedelta","``",",","representing","the","sliding","window","size","in","terms","of","the","index","(","in","case","of","a","int","or","float",")","or","the","sliding","window","duration","(","in","case","of","``","pd.Timedelta","``",")",".","strides",":","Union","[","float",",","pd.Timedelta",",","List","[","Union","[","float",",","pd.Timedelta","]","]","]",",","optional","Either","a","list","of","int",",","float",",","or","``","pd.Timedelta","``",",","representing","the","stride","sizes","in","terms","of","the","index","(","in","case","of","a","int","or","float",")","or","the","stride","duration","(","in","case","of","``","pd.Timedelta","``",")",".","By","default","None",".","segment_start_idxs",":","np.ndarray",",","optional","The","start","indices","for","the","segmented","windows",".","If","not","provided",",","the","start","indices","will","be","computed","from","the","data","using","the","passed","``","strides","``","or","by","using","the","``","segment_end_idxs","``","(","if","not","none",")","+","``","window","``",".","By","default","None",".","segment_end_idxs",":","np.ndarray",",","optional","The","end","indices","for","the","segmented","windows",".","If","not","provided",",","the","end","indices","will","be","computed","from","either","(","1",")","the","data","using","the","passed","``","window","``","+","``","strides","``","or","(","2",")","the","``","segment_start_idxs","``","+","``","window","``",",","By","default","None",".","..","Note",":",":","When","you","pass","arrays","to","both","``","segment_start_idxs","``","and","``","segment_end_idxs","``",",","the","corresponding","index-values","of","these","arrays","will","be","used","as","segment-ranges",".","As","a","result",",","the","following","properties","must","be","met",":","-","both","arrays","should","have","equal","length","-","all","values","in","``","segment_start_idxs","``","should","be","<","=","``","segment_end_idxs","``","start_idx",":","Union","[","float",",","pd.Timestamp","]",",","optional","The","start-index","which","will","be","used","for","each","series","passed","to","`","data","`",".","This","is","especially","useful","if","multiple","``","StridedRolling","``","instances","are","created","and","the","user","want","to","ensure","same","(","start-",")","indexes","for","each","of","them",".","end_idx",":","Union","[","float",",","pd.Timestamp","]",",","optional","The","end-index","which","will","be","used","as","sliding","end-limit","for","each","series","passed","to","`","data","`",".","func_data_type",":","Union","[","np.array",",","pd.Series","]",",","optional","The","data","type","of","the","stroll","(","either","np.array","or","pd.Series",")",",","by","default","np.array",".","<","br",">","..","Note",":",":","Make","sure","to","only","set","this","argument","to","pd.Series","when","this","is","really","required",",","since","pd.Series","strided-rolling","is","significantly","less","efficient",".","For","a","np.array","it","is","possible","to","create","very","efficient","views",",","but","there","is","no","such","thing","as","a","pd.Series","view",".","Thus",",","for","each","stroll",",","a","new","series","is","created",",","inducing","a","lot","of","non-feature","calculation","of","overhead",".","window_idx",":","str",",","optional","The","window","'s","index","position","which","will","be","used","as","index","for","the","feature_window","aggregation",".","Must","be","either","of",":","`","[","``","begin","''",",","``","middle","''",",","``","end","''","]","`",",","by","default","``","end","''",".","include_final_window",":","bool",",","optional","Whether","the","final","(","possibly","incomplete",")","window","should","be","included","in","the","strided-window","segmentation",",","by","default","False",".","..","Note",":",":","The","remarks","below","apply","when","``","include_final_window","``","is","set","to","True",".","The","user","should","be","aware","that","the","last","window","*","might","*","be","incomplete",",","i.e",".",";","-","when","equally","sampled",",","the","last","window","*","might","*","be","smaller","than","the","the","other","windows",".","-","when","not","equally","sampled",",","the","last","window","*","might","*","not","include","all","the","data","points","(","as","the","begin-time","+","window-size","comes","after","the","last","data","point",")",".","Note",",","that","when","equally","sampled",",","the","last","window","*","will","*","be","a","full","window","when",":","-","the","stride","is","the","sampling","rate","of","the","data","(","or","stride","=","1","for","sample-based","configurations",")",".","<","br",">","*","*","Remark","*","*",":","that","when","`","include_final_window","`","is","set","to","False",",","the","last","window","(","which","is","a","full",")","window","will","not","be","included","!","-","*","(","len","*","sampling_rate","-","window_size",")","%","stride","=","0","*",".","Remark","that","the","above","case","is","a","base","case","of","this",".","approve_sparsity",":","bool",",","optional","Bool","indicating","whether","the","user","acknowledges","that","there","may","be","sparsity","(","i.e.",",","irregularly","sampled","data",")",",","by","default","False",".","If","False","and","sparsity","is","observed",",","a","warning","is","raised",".","Notes","--","--","-","*","This","instance","withholds","a","*","*","read-only","*","*","-view","of","the","data","its","values","."]
docstr: Construct the start indices of the segments (for all stride values).
  
  To realize this, we compute the start idxs for each stride and then merge them
  together (without duplicates) in a sorted array.
docstr_tok: ["Construct","the","start","indices","of","the","segments","(","for","all","stride","values",")",".","To","realize","this",",","we","compute","the","start","idxs","for","each","stride","and","then","merge","them","together","(","without","duplicates",")","in","a","sorted","array","."]
code: def _construct_start_idxs(self) -> np.ndarray:
      """Construct the start indices of the segments (for all stride values).
  
      To realize this, we compute the start idxs for each stride and then merge them
      together (without duplicates) in a sorted array.
      """
      start_idxs = []
      for stride in self.strides:
          start_idxs += [self._get_np_start_idx_for_stride(stride)]
      # note - np.unique also sorts the array
      return np.unique(np.concatenate(start_idxs))
  
imports: from __future__ import annotations
  import time
  import warnings
  from abc import ABC, abstractmethod
  from collections import namedtuple
  from typing import List, Optional, Tuple, TypeVar, Union
  import numpy
  import pandas
  from ...utils.attribute_parsing import AttributeParser, DataType
  from ...utils.data import SUPPORTED_STROLL_TYPES, to_list, to_series_list, to_tuple
  from ...utils.time import timedelta_to_str
  from ..function_wrapper import FuncWrapper, _get_name
  from ..logger import logger
  from ..utils import _check_start_end_array, _determine_bounds
label_desc: Use image node_id 4 for calling the StridedRolling obj's underlying member method code with example usage: obj._construct_start_idxs() and returns: np