class_docstr: This handler sends events to a queue. Typically, it would be used together
  with a multiprocessing Queue to centralise logging to file in one process
  (in a multi-process application), so as to avoid file write contention
  between processes.
  
  This code is new in Python 3.2, but this class can be copy pasted into
  user code for use with earlier Python versions.
class_docstr_tok: ["This","handler","sends","events","to","a","queue",".","Typically",",","it","would","be","used","together","with","a","multiprocessing","Queue","to","centralise","logging","to","file","in","one","process","(","in","a","multi-process","application",")",",","so","as","to","avoid","file","write","contention","between","processes",".","This","code","is","new","in","Python","3.2",",","but","this","class","can","be","copy","pasted","into","user","code","for","use","with","earlier","Python","versions","."]
docstr: Prepares a record for queuing. The object returned by this method is
  enqueued.
  
  The base implementation formats the record to merge the message
  and arguments, and removes unpickleable items from the record
  in-place.
  
  You might want to override this method if you want to convert
  the record to a dict or JSON string, or send a modified copy
  of the record while leaving the original intact.
docstr_tok: ["Prepares","a","record","for","queuing",".","The","object","returned","by","this","method","is","enqueued",".","The","base","implementation","formats","the","record","to","merge","the","message","and","arguments",",","and","removes","unpickleable","items","from","the","record","in-place",".","You","might","want","to","override","this","method","if","you","want","to","convert","the","record","to","a","dict","or","JSON","string",",","or","send","a","modified","copy","of","the","record","while","leaving","the","original","intact","."]
code: def prepare(self, record):
      """
      Prepares a record for queuing. The object returned by this method is
      enqueued.
  
      The base implementation formats the record to merge the message
      and arguments, and removes unpickleable items from the record
      in-place.
  
      You might want to override this method if you want to convert
      the record to a dict or JSON string, or send a modified copy
      of the record while leaving the original intact.
      """
      record.msg = self.format(record)
      record.args = None
      record.exc_info = None
      return record
  
imports: import json
  import logging
  import os
  import sys
  from collections import OrderedDict
  from tqdm import tqdm
  from tqdm.auto import tqdm
label_desc: Use image node_id 3 for calling the QueueHandler obj's underlying member method code with example usage: obj.prepare(record) and returns: record