def METHOD_NAME(func):
    def wrapper(*args, **kwargs):
        local_rank = 0
        if paddle.fluid.core.is_compiled_with_dist() and paddle.distributed.get_world_size() > 1:
            local_rank = paddle.distributed.ParallelEnv().dev_id
        if local_rank == 0:
            func(*args, **kwargs)
    return wrapper