code: def _sliding_strided_window_1d(
      data: np.ndarray, window: int, step: int, nb_segments: int
  ):
      """View based sliding strided-window for 1-dimensional data.
  
      Parameters
      ----------
      data: np.array
          The 1-dimensional series to slide over.
      window: int
          The window size, in number of samples.
      step: int
          The step size (i.e., the stride), in number of samples.
      nb_segments: int
          The number of sliding window steps, this is equal to the number of feature
          windows.
  
      Returns
      -------
      nd.array
          A view of the sliding strided window of the data.
  
      """
      # window and step in samples
      assert data.ndim == 1, "data must be 1 dimensional"
      assert isinstance(
          window, (int, np.integer)
      ), "window must be an integer"
      assert isinstance(
          step, (int, np.integer)
      ), "step must be an integer"
  
      assert (step >= 1) & (window < len(data))
  
      shape = [
          nb_segments,
          window,
      ]
  
      strides = [
          data.strides[0] * step,
          data.strides[0],
      ]
  
      return np.lib.stride_tricks.as_strided(
          data, shape=shape, strides=strides  # , writeable=False
      )
  
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 1 for calling a global function with example usage: _sliding_strided_window_1d(data, window, step, nb_segments) and returns: np