code: def extract_sequences(x, sequence_length, sequence_stride):
      *batch_shape, _ = x.shape
      batch_shape = list(batch_shape)
      shape = x.shape[:-1] + (
          (x.shape[-1] - (sequence_length - sequence_stride))
          // sequence_stride,
          sequence_length,
      )
      strides = x.strides[:-1] + (
          sequence_stride * x.strides[-1],
          x.strides[-1],
      )
      x = np.lib.stride_tricks.as_strided(
          x, shape=shape, strides=strides
      )
      return np.reshape(x, (*batch_shape, *x.shape[-2:]))
  
imports: import numpy
  from keras.backend import standardize_dtype
  from keras.backend.jax.math import fft
  from keras.backend.jax.math import fft2
  from keras.backend.numpy.core import convert_to_tensor
  from keras.utils.module_utils import scipy
label_desc: Use image node_id 7 for calling a global function with example usage: extract_sequences(x, sequence_length, sequence_stride) and returns: np