code: def add_document(self, **fields):
      self.tasks[self.pointer].add_document(**fields)
      self.pointer = (self.pointer + 1) % len(self.tasks)
      self._added_sub = True
  
imports: from __future__ import with_statement
  from multiprocessing import Process, Queue, cpu_count
  from whoosh.compat import queue, xrange, pickle
  from whoosh.codec import base
  from whoosh.writing import SegmentWriter
  from whoosh.externalsort import imerge
  from whoosh.util import random_name
label_desc: Use image node_id 2 for calling the SerialMpWriter obj's underlying member method code with example usage: obj.add_document() without return types