class_docstr: Base class of queue snapshot writers.
  
  This class is a base class of snapshot writers that use a queue.
  A Queue is created when this class is constructed, and every time when
  ``__call__`` is invoked, a snapshot task is put into the queue.
  
  Args:
      savefun: Callable object which is passed to the :meth:`create_task`
          if the task is ``None``. It takes three arguments: the output file
          path, the serialized dictionary object, and the optional keyword
          arguments.
      task: Callable object. Its ``__call__`` must have a same interface to
          ``Writer.__call__``. This object is directly put into the queue.
  
  .. seealso::
  
      - :meth:`chainer.training.extensions.snapshot`
code: def finalize(self):
      if self._started:
          if not self._finalized:
              self._queue.put(None)
              self._queue.join()
              self._consumer.join()
          self._started = False
      self._finalized = True
  
imports: import multiprocessing
  import os
  import shutil
  import threading
  from six.moves import queue
  from chainer.serializers import npz
  from chainer import utils
label_desc: Use image node_id 7 for calling the QueueWriter obj's underlying member method code with example usage: obj.finalize() without return types