code: def test_bundledprofiler():
      class DummyA(BundledProfiler):
          _profilers = []
  
      class DummyB(BundledProfiler):
          _profilers = [fun_series]
  
      class DummyC(BundledProfiler):
          _profilers = [fun_frame]
  
      class DummyD(BundledProfiler):
          _profilers = [fun_series, fun_frame, fun_either]
  
      assert DummyA.get_profilers() == {}
      assert DummyA.get_config_defaults() == {}
      assert DummyA.get_profilers(target="frame") == {}
      assert DummyA.get_profilers(target="series") == {}
  
      assert list(DummyB.get_profilers()) == ["fun_series"]
      assert list(DummyB.get_config_defaults()) == ["fun_series"]
      assert list(DummyB.get_profilers(target="frame")) == []
      assert list(DummyB.get_profilers(target="series")) == [
          "fun_series"
      ]
      assert all(
          [
              is_dataclass(c)
              for c in DummyB.get_config_defaults(False).values()
          ]
      )
      assert all(
          [
              c.is_pframe
              for c in DummyB.get_profilers(target="frame").values()
          ]
      )
      assert all(
          [
              c.is_pseries
              for c in DummyB.get_profilers(target="series").values()
          ]
      )
  
      assert list(DummyC.get_profilers()) == ["fun_frame"]
      assert list(DummyC.get_config_defaults()) == ["fun_frame"]
      assert list(DummyC.get_profilers(target="frame")) == ["fun_frame"]
      assert list(DummyC.get_profilers(target="series")) == []
      assert all(
          [
              isinstance(c, dict)
              for c in DummyC.get_config_defaults().values()
          ]
      )
      assert all(
          [
              c.is_pframe
              for c in DummyC.get_profilers(target="frame").values()
          ]
      )
      assert all(
          [
              c.is_pseries
              for c in DummyC.get_profilers(target="series").values()
          ]
      )
  
      assert list(DummyD.get_profilers()) == [
          "fun_series",
          "fun_frame",
          "fun_either",
      ]
      assert list(DummyD.get_config_defaults()) == [
          "fun_series",
          "fun_frame",
          "fun_either",
      ]
      assert list(DummyD.get_profilers(target="frame")) == [
          "fun_frame",
          "fun_either",
      ]
      assert list(DummyD.get_profilers(target="series")) == [
          "fun_series",
          "fun_either",
      ]
      assert all(
          [
              is_dataclass(c)
              for c in DummyD.get_config_defaults(False).values()
          ]
      )
      assert all(
          [
              c.is_pframe
              for c in DummyD.get_profilers(target="frame").values()
          ]
      )
      assert all(
          [
              c.is_pseries
              for c in DummyD.get_profilers(target="series").values()
          ]
      )
  
      a1 = DummyA(config={"a": {"x": 1}})
      a2 = DummyA(scheduler=1)
      assert a1.config == {"a": {"x": 1}}
      assert a2.config == {}
      assert a2.scheduler == 1
  
      class XScheduler:
          def run(self, fn, args, desc):
              return [fn(*arg) for arg in args]
  
      d = DummyD(scheduler=XScheduler())
      ret = d.profile(
          pd.DataFrame(
              {"a": [1, 2, 3], "b": [4, 5, 6]},
              index=pd.date_range("1990-01-01", "1990-01-03", freq="D"),
          )
      )
      assert is_dataclass(ret)
      assert isinstance(ret, BundledResult)
      assert ret.success
      assert list(ret.result.frame.keys()) == [
          "fun_frame",
          "fun_either",
      ]
      assert list(ret.result.series.keys()) == ["a", "b"]
      assert ret.result.config == {
          "fun_frame": {},
          "fun_series": {},
          "fun_either": {},
      }
      assert isinstance(ret.result.exec_details, pd.DataFrame)
      assert len(ret.result.exec_details.query("~ Succeeded")) == 0
      assert len(ret.result.exec_details) == 6
  
file_path: tslumen/tests/unit/profile/test_base.py
imports: import pytest
  from typing import Union
  from dataclasses import is_dataclass
  from datetime import datetime
  import pandas
  from tslumen.profile.base import ProfileException, ProfileResult, ProfilingFunction, BundledProfiler, BundledResult, valid_timeseries
label_desc: Use image node_id 13 for calling a global function with example usage: test_bundledprofiler() and returns: unknown