code: def worker(qin, qout, f):
      
      while not qin.empty():
          i, args = qin.get()
          qout.put((i, f(**args)))
docs: Worker for muliprocessing.
      
      A worker repeatedly picks a dict of arguments in the queue and computes 
      f for this set of arguments, until the input queue is empty.