def single_machine_run(params):
    """Main function for distributed implementation on a single machine

    Parameters:
    -----------
    params : argparser object
        Argument Parser structure with pre-determined arguments as defined
        at the bottom of this file.
    """
    processes = []
    mp.set_start_method("spawn")

    # Invoke `target` function from each of the spawned process for distributed
    # implementation
    for rank in range(params.world_size):
        p = mp.Process(
            target=run,
            args=(rank, params.world_size, gen_dist_partitions, params),
        )
        p.start()
        processes.append(p)

    for p in processes:
        p.join()
Main function for distributed implementation on a single machine

    Parameters:
    -----------
    params : argparser object
        Argument Parser structure with pre-determined arguments as defined
        at the bottom of this file.
    
tools/distpartitioning/data_shuffle.py