class_docstr: BasicProfiler is the default profiler, which is implemented based on
  cProfile and Accumulator
class_docstr_tok: ["BasicProfiler","is","the","default","profiler",",","which","is","implemented","based","on","cProfile","and","Accumulator"]
code: def stats(self) -> pstats.Stats:
      return cast(pstats.Stats, self._accumulator.value)
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TYPE_CHECKING, Union, cast
  import cProfile
  import inspect
  import pstats
  import linecache
  import os
  import atexit
  import sys
  import warnings
  from pyspark.accumulators import AccumulatorParam
  from pyspark.errors import PySparkRuntimeError
label_desc: Use image node_id 3 for calling the BasicProfiler obj's underlying member method code with example usage: obj.stats() and returns: cast