code: def lazy_parallelize(func, result, processes=None, partition_size=None):
      
      if processes is None or processes < 1:
          processes = CPU_COUNT
      else:
          processes = min(processes, CPU_COUNT)
      partition_size = partition_size or compute_partition_size(result, processes)
      pool = Pool(processes=processes)
      partitions = split_every(partition_size, iter(result))
      packed_partitions = (pack(func, (partition, )) for partition in partitions)
      for pool_result in pool.imap(unpack, packed_partitions):
          yield pool_result
      pool.terminate()
docs: Lazily computes an iterable in parallel, and returns them in pool chunks
      :param func: Function to apply
      :param result: Data to apply to
      :param processes: Number of processes to use in parallel
      :param partition_size: Size of partitions for each parallel process
      :return: Iterable of chunks where each chunk as func applied to it