def pyg_edge_index_to_tuples(edge_index):
    """
    Convert edge_index to a list of (source, target) tuples.

    Args:
        edge_index (torch.long): Edge COO with shape [2, num_edges].
    
    Return:
        edge_tuples (list of tuple): Edge tuples.
    """
    edge_tuples = [
        (edge_index[0, i].item(), edge_index[1, i].item()) \
            for i in range(edge_index.shape[1])
    ]
    return edge_tuples