code: def parallel_fn(f):
      
  
      def simple_parallel(func, sequence, **args):
          """ f takes an element of sequence as input and the keyword args in **args"""
          if 'processes' in args:
              processes = args.get('processes')
              del args['processes']
          else:
              processes = multiprocessing.cpu_count()
  
          pool = multiprocessing.Pool(processes)  # depends on available cores
  
          result = pool.map_async(universal_worker, pool_args(func, sequence, args))
          pool.close()
          pool.join()
          cleaned = [x for x in result.get() if x is not None]  # getting results
          cleaned = asarray(cleaned)
          return cleaned
      return partial(simple_parallel, f)
docs: Simple wrapper function, returning a parallel version of the given function f.
         The function f must have one argument and may have an arbitray number of
         keyword arguments.