code: def _test_profiler(fn, args, r_is_pseries, r_is_pframe, result):
      assert fn.is_pseries == r_is_pseries
      assert fn.is_pframe == r_is_pframe
      assert is_dataclass(fn.config)
  
      ret = fn(args)
      assert isinstance(ret, ProfileResult)
      assert bool(ret)
      assert ret.exception is None
      assert ret.end >= ret.start
      for k, val in result.items():
          assert (
              ret[k] == val
          ), f"Error checking {k}, expected {val} got {ret[k]}"
  
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 4 for calling a global function with example usage: _test_profiler(fn, args, r_is_pseries, r_is_pframe, result) without return types