code: def test_apply_func():
      feature = "asc_numbers"
      df = get_test_data()
  
      apply_funcs = [
          {
              "func": np.std,
              "features": [feature],
              "metrics": ["a", "b"],
              "entire": True,
          },
          {
              "func": np.mean,
              "features": [feature],
              "metrics": ["a", "b"],
              "entire": True,
          },
      ]
  
      d = apply_func(
          feature=feature,
          selected_metrics=["a", "b"],
          df=df,
          arr=apply_funcs[0],
      )
      np.testing.assert_array_equal(list(d.keys()), ["a_std", "b_std"])
      np.testing.assert_almost_equal(d["a_std"], 28.86607)
      np.testing.assert_almost_equal(d["b_std"], 0.5)
  
      d = apply_func(
          feature=feature,
          selected_metrics=["a", "b"],
          df=df,
          arr=apply_funcs[1],
      )
      np.testing.assert_array_equal(
          list(d.keys()), ["a_mean", "b_mean"]
      )
      np.testing.assert_equal(d["a_mean"], 49.5)
      np.testing.assert_equal(d["b_mean"], 1.5)
  
file_path: popmon/tests/popmon/analysis/profiling/test_apply_func.py
imports: import numpy
  import pandas
  import pytest
  from popmon.analysis.apply_func import ApplyFunc, apply_func, apply_func_array
  from popmon.analysis.functions import pull
  from popmon.analysis.profiling.pull_calculator import ExpandingPullCalculator, ReferencePullCalculator, RefMedianMadPullCalculator, RollingPullCalculator
  from popmon.base import Pipeline
label_desc: Use image node_id 9 for calling a global function with example usage: test_apply_func() without return types