class_docstr: A shared variable that can be accumulated, i.e., has a commutative and associative "add"
  operation. Worker tasks on a Spark cluster can add values to an Accumulator with the `+=`
  operator, but only the driver program is allowed to access its value, using `value`.
  Updates from the workers get propagated automatically to the driver program.
  
  While :class:`SparkContext` supports accumulators for primitive data types like :class:`int` and
  :class:`float`, users can also define accumulators for custom types by providing a custom
  :py:class:`AccumulatorParam` object. Refer to its doctest for an example.
  
  Examples
  --------
  >>> a = sc.accumulator(1)
  >>> a.value
  1
  >>> a.value = 2
  >>> a.value
  2
  >>> a += 5
  >>> a.value
  7
  >>> sc.accumulator(1.0).value
  1.0
  >>> sc.accumulator(1j).value
  1j
  >>> rdd = sc.parallelize([1,2,3])
  >>> def f(x):
  ...     global a
  ...     a += x
  ...
  >>> rdd.foreach(f)
  >>> a.value
  13
  >>> b = sc.accumulator(0)
  >>> def g(x):
  ...     b.add(x)
  ...
  >>> rdd.foreach(g)
  >>> b.value
  6
  
  >>> rdd.map(lambda x: a.value).collect() # doctest: +IGNORE_EXCEPTION_DETAIL
  Traceback (most recent call last):
      ...
  Py4JJavaError: ...
  
  >>> def h(x):
  ...     global a
  ...     a.value = 7
  ...
  >>> rdd.foreach(h) # doctest: +IGNORE_EXCEPTION_DETAIL
  Traceback (most recent call last):
      ...
  Py4JJavaError: ...
  
  >>> sc.accumulator([1.0, 2.0, 3.0]) # doctest: +IGNORE_EXCEPTION_DETAIL
  Traceback (most recent call last):
      ...
  TypeError: ...
docstr: Adds a term to this accumulator's value
docstr_tok: ["Adds","a","term","to","this","accumulator","'s","value"]
code: def add(self, term: T) -> None:
      """Adds a term to this accumulator's value"""
      self._value = self.accum_param.addInPlace(self._value, term)
  
imports: import sys
  import select
  import struct
  import socketserver
  import threading
  from typing import Callable, Dict, Generic, Tuple, Type, TYPE_CHECKING, TypeVar, Union
  from pyspark.serializers import read_int, CPickleSerializer
  from pyspark.errors import PySparkRuntimeError
label_desc: Use image node_id 5 for calling the Accumulator obj's underlying member method code with example usage: obj.add(term) without return types