class_docstr: MemoryProfiler, which is implemented based on memory profiler and Accumulator
class_docstr_tok: ["MemoryProfiler",",","which","is","implemented","based","on","memory","profiler","and","Accumulator"]
code: def __init__(self, ctx: "SparkContext") -> None:
      super().__init__(ctx)
      # Creates a new accumulator for combining the profiles
      self._accumulator = ctx.accumulator(None, MemUsageParam)
  
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 1 to create a new MemoryProfiler object from inherited base classes: Profiler with example: obj = MemoryProfiler(ctx)