code: def test_accumulator_when_reuse_worker(self):
      from pyspark.accumulators import INT_ACCUMULATOR_PARAM
  
      acc1 = self.sc.accumulator(0, INT_ACCUMULATOR_PARAM)
      self.sc.parallelize(range(100), 20).foreach(lambda x: acc1.add(x))
      self.assertEqual(sum(range(100)), acc1.value)
  
      acc2 = self.sc.accumulator(0, INT_ACCUMULATOR_PARAM)
      self.sc.parallelize(range(100), 20).foreach(lambda x: acc2.add(x))
      self.assertEqual(sum(range(100)), acc2.value)
      self.assertEqual(sum(range(100)), acc1.value)
  
imports: import os
  import sys
  import tempfile
  import threading
  import time
  import unittest
  from py4j.protocol import Py4JJavaError
  from pyspark import SparkConf, SparkContext
  from pyspark.testing.utils import ReusedPySparkTestCase, PySparkTestCase, QuietTest, eventually
label_desc: Use image node_id 5 for calling the WorkerTests obj's underlying member method code with example usage: obj.test_accumulator_when_reuse_worker() without return types