code: def commit(self, mergetype=None, optimize=None, merge=None):
      if self._added_sub:
          # If documents have been added to sub-writers, use the parallel
          # merge commit code
          self._commit(mergetype, optimize, merge)
      else:
          # Otherwise, just do a regular-old commit
          SegmentWriter.commit(
              self, mergetype=mergetype, optimize=optimize, merge=merge
          )
  
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 9 for calling the MpWriter obj's underlying member method code with example usage: obj.commit(mergetype, optimize, merge) without return types