code: def _merge_subsegments(self, results, mergetype):
      schema = self.schema
      schemanames = set(schema.names())
      storage = self.storage
      codec = self.codec
      sources = []
  
      # If information was added to this writer the conventional (e.g.
      # through add_reader or merging segments), add it as an extra source
      if self._added:
          sources.append(self.pool.iter_postings())
  
      pdrs = []
      for runname, fieldnames, segment in results:
          fieldnames = set(fieldnames) | schemanames
          pdr = codec.per_document_reader(storage, segment)
          pdrs.append(pdr)
          basedoc = self.docnum
          docmap = self.write_per_doc(fieldnames, pdr)
          assert docmap is None
  
          items = self._read_and_renumber_run(runname, basedoc)
          sources.append(items)
  
      # Create a MultiLengths object combining the length files from the
      # subtask segments
      self.perdocwriter.close()
      pdrs.insert(0, self.per_document_reader())
      mpdr = base.MultiPerDocumentReader(pdrs)
  
      try:
          # Merge the iterators into the field writer
          self.fieldwriter.add_postings(schema, mpdr, imerge(sources))
      finally:
          mpdr.close()
      self._added = 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 11 for calling the MpWriter obj's underlying member method code with example usage: obj._merge_subsegments(results, mergetype) without return types