import torch


def tensor_to_tuple_list(tensor: torch.Tensor):
    """Converts a tensor of shape [[x], [y]] in an
    array of tuples of shape [(x, y)].
    """
    assert len(tensor.shape) == 2, \
        "The tensor should be of shape (n, n)"
    
    edges = [(int(edge[0]), int(edge[1])) \
        for edge in zip(tensor[0], tensor[1])]
    return edges