class_docstr: Decorator for turning a function into a profiler. Inspects the function's signature and
  builds a dataclass representing its configurations (for integrating with ``Hydra``). Adds two
  attributes ``is_pseries`` and ``is_pframe`` to distinguish whether it targets Series or
  DataFrames. This is inferred based on the type annotation of the first parameter. Captures the
  start and end timestamps, the return value, as well as any warnings or exceptions raised during
  the execution.
  
  Args:
      fn (Callable): Profiler function to decorate.
class_docstr_tok: ["Decorator","for","turning","a","function","into","a","profiler",".","Inspects","the","function","'s","signature","and","builds","a","dataclass","representing","its","configurations","(","for","integrating","with","``","Hydra","``",")",".","Adds","two","attributes","``","is_pseries","``","and","``","is_pframe","``","to","distinguish","whether","it","targets","Series","or","DataFrames",".","This","is","inferred","based","on","the","type","annotation","of","the","first","parameter",".","Captures","the","start","and","end","timestamps",",","the","return","value",",","as","well","as","any","warnings","or","exceptions","raised","during","the","execution",".","Args",":","fn","(","Callable",")",":","Profiler","function","to","decorate","."]
code: def __call__(self, *args: Any, **kwargs: Any) -> Any:
      result = ProfileResult()
      result.start = datetime.now()
      result.name = self.fn.__name__
      result.warnings = []
      try:
          bargs = self.sig.bind(*args, **kwargs)
          data = bargs.arguments[self._par_data]
          result.scope = (
              "frame" if isinstance(data, pd.DataFrame) else "series"
          )
          result.target = str(
              getattr(data, "name", "") or ""
              if result.scope == "series"
              else ""
          )
          with warnings.catch_warnings(record=True) as w:
              result.result = self.fn(*args, **kwargs)
              result.success = True
              result.warnings += w
      except Exception as e:
          result.result = None
          result.success = False
          result.exception = ProfileException(e)
      finally:
          result.end = datetime.now()
      return result
  
imports: from typing import Any, Optional, Union, Dict, List, Callable, Tuple, KeysView, ValuesView, ItemsView
  from dataclasses import dataclass, make_dataclass, field, asdict, is_dataclass
  from functools import update_wrapper
  from inspect import signature, Signature
  from datetime import datetime
  import warnings
  from typing_inspect import is_union_type, get_args
  import pandas
  from tslumen.scheduling import Scheduler
  from tslumen.misc import repr_html
label_desc: Use image node_id 2 for calling the ProfilingFunction obj's underlying member method code with example usage: obj.__call__() and returns: result