def get_labels(G):
    """Gets all the various labels of a graph

    Args:
        G (Graph): graph

    Returns:
        [set]: Set of labels
    """
    labels = set()
    for g in G:
        for i in range(g.number_of_nodes()):
            labels.add(g.nodes[i]["labels"][0])
    return labels