with multiprocessing.Pool(initializer=worker_init, initargs=(matrix,)) as pool:
    for i, j, val in pool.starmap(worker, itertools.combinations(list(range(size)), 2)):
        result[i][j] = result[j][i] = val
return result
if __name__ == '__main__':
    main(t_matrix)
Распараллелить этот вложенный цикл for в python