def METHOD_NAME(config):
    paddle.set_device(config.Global.device)
    mesh = Mesh(
        get_local_rank(),
        config.Distributed.dp_degree,
        config.Distributed.mp_degree,
        config.Distributed.pp_degree,
    )
    set_mesh(mesh)
    paddle.distributed.fleet.init(is_collective=True)