code: def test_single_signal_series_pipeline(dummy_data):
      def interpolate(series: pd.Series) -> pd.Series:
          return series.interpolate()
  
      @dataframe_func  # Note: this can (and should) be a single_series_func as dropna works on pd.Series
      def drop_nans(df: pd.DataFrame) -> pd.DataFrame:
          return df.dropna()
  
      inp = dummy_data.copy()
      inp.loc[inp["TMP"] > 31.5, "TMP"] = pd.NA
      assert any(
          inp["TMP"].isna()
      )  # Check that there are some NANs present
      series_pipeline = SeriesPipeline(
          [
              SeriesProcessor(series_names="TMP", function=interpolate),
              SeriesProcessor(series_names="TMP", function=drop_nans),
          ]
      )
  
      res_list_all = series_pipeline.process(
          inp, return_all_series=True, return_df=False
      )
      res_list_req = series_pipeline.process(
          inp, return_all_series=False, return_df=False
      )
      res_df_all = series_pipeline.process(
          inp, return_all_series=True, return_df=True
      )
      res_df_req = series_pipeline.process(
          inp, return_all_series=False, return_df=True
      )
  
      assert series_pipeline.get_required_series() == ["TMP"]
  
      assert isinstance(res_list_all, list) & isinstance(
          res_list_req, list
      )
      assert isinstance(res_df_all, pd.DataFrame) & isinstance(
          res_df_req, pd.DataFrame
      )
  
      assert set([s.name for s in res_list_all]) == set(
          dummy_data.columns
      )
      assert set(res_df_all.columns) == set(dummy_data.columns)
      assert set([s.name for s in res_list_req]) == set(["TMP"])
      assert res_df_req.columns == ["TMP"]
  
      tmp_idx_all = [
          i
          for i in range(len(res_list_all))
          if res_list_all[i].name == "TMP"
      ][0]
      tmp_idx_req = [
          i
          for i in range(len(res_list_req))
          if res_list_req[i].name == "TMP"
      ][0]
      eda_idx_all = [
          i
          for i in range(len(res_list_all))
          if res_list_all[i].name == "EDA"
      ][0]
  
      # Check if length is smaller because NANs were removed
      assert len(res_df_req) < len(
          dummy_data
      )  # Because only required signals returned
      assert len(res_list_all[tmp_idx_all]) < len(
          dummy_data
      )  # Because no df
      assert len(res_list_req[tmp_idx_req]) < len(
          dummy_data
      )  # Because no df
      # When merging all signals to df, the length should be the original length
      assert len(res_df_all) == len(dummy_data)
  
      # Check that there are no NANs present
      assert not any(res_df_req["TMP"].isna())
      assert ~any(res_list_all[tmp_idx_all].isna())
      assert ~any(res_list_req[tmp_idx_req].isna())
      # NaNs get introduced when merging all signals to df
      assert any(res_df_all["TMP"].isna())
  
      assert all(
          res_df_all["TMP"].dropna().values == res_list_all[tmp_idx_all]
      )
      assert all(res_df_req["TMP"].values == res_list_all[tmp_idx_all])
  
      assert all(res_list_all[eda_idx_all] == inp["EDA"])
      assert all(res_df_all["EDA"] == inp["EDA"])
  
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 1 for calling a global function with example usage: test_single_signal_series_pipeline(dummy_data) and returns: series, df