code: def test_series_numpy_func(dummy_data):
      # Create series numpy function
      def normalized_freq_scale(series: pd.Series) -> np.ndarray:
          # NOTE: this is a really useless function, but it highlights a legit use case
          sr = (
              1
              / pd.to_timedelta(
                  pd.infer_freq(series.index)
              ).total_seconds()
          )
          return np.interp(
              series, (series.min(), series.max()), (0, sr)
          )
  
      series_numpy_f = normalized_freq_scale
  
      inp = dummy_data["TMP"]
  
      # Undecorated numpy function
      assert isinstance(inp, pd.Series)
      res = series_numpy_f(inp)
      assert isinstance(res, np.ndarray)
      assert res.shape == dummy_data["TMP"].shape
      assert res.dtype == np.float64
      assert (min(res) == 0) & (max(res) > 0)
  
      # # Decorated series function
      processor = SeriesProcessor(
          series_names=["TMP"], function=series_numpy_f
      )
      series_dict = series_to_series_dict(inp)
      assert isinstance(inp, pd.Series)
      res = processor(series_dict)
      assert isinstance(res, dict)
      assert res.keys() == series_dict.keys()
      assert isinstance(res["TMP"], pd.Series)
      assert res["TMP"].shape == dummy_data["TMP"].shape
      assert np.issubdtype(res["TMP"], np.number)
      assert (min(res["TMP"]) == 0) & (max(res["TMP"]) > 0)
  
imports: from typing import List
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_index_equal, assert_series_equal
  from tsflex.processing import SeriesProcessor, dataframe_func
  from .utils import dataframe_to_series_dict, dummy_data, series_to_series_dict
label_desc: Use image node_id 9 for calling a global function with example usage: test_series_numpy_func(dummy_data) and returns: np