def is_canonical(G):
    """Tests if the graph has been canonicalized.

    Parameters
    ----------
    G : NetworkX graph


    Returns
    -------
    bool
    Returns True, if the graph has been canonicalized.

    """
    if 'label_map' in G.graph and 'canonical_map' in G.graph:
        return True
    else:
        return False
