code: def test_pipeline_steps_operations_series_pipeline(dummy_data):
      def drop_nans(series: pd.Series) -> pd.Series:
          return series.dropna()
  
      def percentile_clip(series, l_perc=0.01, h_perc=0.99):
          # Note: this func is useless in ML (data leakage; percentiles are not fitted)
          l_thresh = np.percentile(series, l_perc * 100)
          h_thresh = np.percentile(series, h_perc * 100)
          return series.clip(l_thresh, h_thresh)
  
      lower = 0.02
      series_pipeline = SeriesPipeline()
  
      assert series_pipeline.get_required_series() == []
      assert series_pipeline.processing_steps == []
  
      series_pipeline.append(
          SeriesProcessor(
              series_names=["TMP", "EDA"],
              function=percentile_clip,
              l_perc=lower,
          )
      )
  
      assert len(series_pipeline.get_required_series()) == 2
      assert set(series_pipeline.get_required_series()) == set(
          ["TMP", "EDA"]
      )
      assert len(series_pipeline.processing_steps) == 1
      assert (
          series_pipeline.processing_steps[0].name == "percentile_clip"
      )
  
      series_pipeline.insert(
          idx=0,
          processor=SeriesProcessor(
              series_names=["ACC_x"], function=drop_nans
          ),
      )
  
      assert len(series_pipeline.get_required_series()) == 3
      assert set(series_pipeline.get_required_series()) == set(
          ["TMP", "EDA", "ACC_x"]
      )
      assert len(series_pipeline.processing_steps) == 2
      assert series_pipeline.processing_steps[0].name == "drop_nans"
      assert (
          series_pipeline.processing_steps[1].name == "percentile_clip"
      )
  
file_path: tsflex/tests/test_processing_series_pipeline.py
imports: import os
  from pathlib import Path
  import dill
  import numpy
  import pandas
  import pytest
  from tsflex.processing import SeriesPipeline, SeriesProcessor, dataframe_func
  from tsflex.processing.series_pipeline import _ProcessingError
  from .utils import dummy_data
label_desc: Use image node_id 5 for calling a global function with example usage: test_pipeline_steps_operations_series_pipeline(dummy_data) and returns: series, series