code: def test_sequence_stroll_apply_func_vectorized_multi_output():
      def min_max(arr, axis=None):
          return np.min(arr, axis=axis), np.max(arr, axis=axis)
  
      f = FuncWrapper(min_max, output_names=["min", "max"])
      f_vect = FuncWrapper(
          min_max,
          output_names=["min_vect", "max_vect"],
          vectorized=True,
          axis=-1,
      )
  
      s = pd.Series(data=[0, 1, 2, 3, 4], name="dummy")
  
      def assert_2col_df_equal(s1, s2):
          assert (s1.shape[1] == 2) & (s2.shape[1] == 2)
          assert np.all(s1.index == s2.index)
          for name in ["min", "max"]:
              assert np.all(
                  s1.filter(like=name).values.ravel()
                  == s2.filter(like=name).values.ravel()
              )
  
      ## No Force
      sr = SequenceStridedRolling(
          s, window=3, strides=[1], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s, window=3, strides=[2], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s, window=3, strides=[3], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s, window=3, strides=[4], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s, window=3, strides=[5], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s, window=3, strides=[50], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
  
      sr = SequenceStridedRolling(
          s, window=4, strides=[1], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
  
      sr = SequenceStridedRolling(
          s, window=5, strides=[1], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s, window=6, strides=[1], window_idx="begin"
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
  
      ## Force
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[1],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[2],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      with pytest.raises(Exception):
          # the vectorized function requires the same number of samples in each segmented window
          # this will result in window of length 3 and 1
          sr = SequenceStridedRolling(
              s,
              window=3,
              strides=[4],
              window_idx="begin",
              include_final_window=True,
          )
          sr.apply_func(f_vect)
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[5],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s,
          window=3,
          strides=[50],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
  
      sr = SequenceStridedRolling(
          s,
          window=4,
          strides=[1],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
  
      sr = SequenceStridedRolling(
          s,
          window=5,
          strides=[1],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
      sr = SequenceStridedRolling(
          s,
          window=6,
          strides=[1],
          window_idx="begin",
          include_final_window=True,
      )
      assert_2col_df_equal(sr.apply_func(f), sr.apply_func(f_vect))
  
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 25 for calling a global function with example usage: test_sequence_stroll_apply_func_vectorized_multi_output() and returns: np,  np