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