def METHOD_NAME(strategy):
    rank = strategy.local_rank
    device = strategy.root_device
    world_size = strategy.num_processes
    tensor = torch.ones(rank, device=device)
    result = _gather_all_tensors(tensor)
    assert len(result) == world_size
    for idx in range(world_size):
        assert len(result[idx]) == idx
        assert (result[idx] == torch.ones_like(result[idx])).all()