How could I merge the subset of output in multiprocessing?

Hi, I am using torch.multiprocess to make my script distributed.

However, I am just curious about how to merge the subset of output into one large output?

Is there any code snippet to easily follow?

Thanks,