code: def distribute(function, iterable, *, workers=4):
      
      with multiprocessing.Pool(workers) as pool:
          processes = []
          for item in iterable:
              pickled = dill.dumps((function, item))
              process = pool.apply_async(_run_pickled, (pickled,))
              processes.append(process)
  
          results = [process.get() for process in processes]
      return results
docs: A version of multiprocessing.Pool.map that works using dill to pickle the
      function and iterable