code: def add_document(self, **fields):
      # Add the document to the docbuffer
      self.docbuffer.append((0, fields))
      # If the buffer is full, flush it to the job queue
      if not self._grouping and len(self.docbuffer) >= self.batchsize:
          self._enqueue()
      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 7 for calling the MpWriter obj's underlying member method code with example usage: obj.add_document() without return types