code: def check_profile_exec(fn, args, out, comparer):
      result = fn(*args)
      assert isinstance(
          result, ProfileResult
      ), f"{type(result)} not ProfileResult"
      assert bool(result), f"result is {bool(result)} -> {str(result)}"
      assert (
          result.exception is None
      ), f"Expecting no exceptions, got {result.exception}"
      assert result.name == fn.__name__, f"Result name is {result.name}"
      assert result.scope in [
          "frame",
          "series",
          "both",
      ], f"Invalid scope {result.scope}"
      assert isinstance(
          result.target, str
      ), f"Target must be a string, got {type(result.target)}"
      assert isinstance(
          result.start, datetime
      ), f"Start must be datetime, got {type(result.start)}"
      assert isinstance(
          result.end, datetime
      ), f"Start must be datetime, got {type(result.end)}"
      assert result.start <= result.end, "Start time should be <= end"
      comparer(result.result, out)
  
file_path: tslumen/tests/unit/profile/base.py
imports: from datetime import datetime
  from dataclasses import is_dataclass
  import numpy
  import pandas
  from tslumen.profile.base import ProfileResult, ProfilingFunction
label_desc: Use image node_id 8 for calling a global function with example usage: check_profile_exec(fn, args, out, comparer) without return types