def METHOD_NAME(
    cls,
    rank: int,
    world_size: int,
    backend: str,
) -> None:
    dist.init_process_group(rank=rank, world_size=world_size, backend=backend)
    pg = dist.new_group(
        ranks=[0, 1],
        backend=backend,
    )
    if pg.rank() == 0:
        assert is_leader(pg, 0) is True
        assert is_leader(pg, 1) is False
    else:
        assert is_leader(pg, 1) is True
        assert is_leader(pg, 0) is False
    dist.destroy_process_group()