code: def _enqueue(self):
      # Flush the documents stored in self.docbuffer to a file and put the
      # filename on the job queue
      docbuffer = self.docbuffer
      dump = pickle.dump
      length = len(docbuffer)
  
      filename = "%s.doclist" % random_name()
      with self.temp_storage().create_file(filename).raw_file() as f:
          for item in docbuffer:
              dump(item, f, 2)
  
      if len(self.tasks) < self.procs:
          self._new_task()
      jobinfo = (filename, length)
      self.jobqueue.put(jobinfo)
      self.docbuffer = []
  
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 3 for calling the MpWriter obj's underlying member method code with example usage: obj._enqueue() without return types