(g)
return g
Moves modifiers into separate edges.

    :param g:
    :return:
    >>> graph_format_update({"edgeSet":[{'canonical_right': 'Washington Redskins', 'hopDown': 'P361v', 'kbID': 'P361v', 'type': 'direct', 'argmax':'time'}]})
    {'edgeSet': [{'type': 'time', 'kbID': 'P585v', 'argmax': 'time'}, {'canonical_right': 'Washington Redskins', 'hopDown': 'P361v', 'kbID': 'P361v', 'type': 'direct'}], 'entities': []}
    >>> graph_format_update({"edgeSet":[{'type': 'time', 'argmax':'time'}]})
    {'edgeSet': [{'type': 'time', 'argmax': 'time', 'kbID': 'P585v'}], 'entities': []}
    >>> graph_format_update({"edgeSet":[{'type': 'iclass', 'kbID': 'P31v', 'canonical_right': ['MTV Movie award', 'award', 'MTV annual movie award']}]})
    {'edgeSet': [{'type': 'iclass', 'kbID': 'P31v', 'canonical_right': 'award'}, {'type': 'iclass', 'kbID': 'P31v', 'canonical_right': 'MTV Movie award'}, {'type': 'iclass', 'kbID': 'P31v', 'canonical_right': 'MTV annual movie award'}], 'entities': []}
Moves modifiers into separate edges.
Moves modifiers into separate edges .
def graph_format_update(g):
    """
    Moves modifiers into separate edges.

    :param g:
    :return:
    >>> graph_format_update({"edgeSet":[{'canonical_right': 'Washington Redskins', 'hopDown': 'P361v', 'kbID': 'P361v', 'type': 'direct', 'argmax':'time'}]})
    {'edgeSet': [{'type': 'time', 'kbID': 'P585v', 'argmax': 'time'}, {'canonical_right': 'Washington Redskins', 'hopDown': 'P361v', 'kbID': 'P361v', 'type': 'direct'}], 'entities': []}
    >>> graph_format_update({"edgeSet":[{'type': 'time', 'argmax':'time'}]})
    {'edgeSet': [{'type': 'time', 'argmax': 'time', 'kbID': 'P585v'}], 'entities': []}
    >>> graph_format_update({"edgeSet":[{'type': 'iclass', 'kbID': 'P31v', 'canonical_right': ['MTV Movie award', 'award', 'MTV annual movie award']}]})
    {'edgeSet': [{'type': 'iclass', 'kbID': 'P31v', 'canonical_right': 'award'}, {'type': 'iclass', 'kbID': 'P31v', 'canonical_right': 'MTV Movie award'}, {'type': 'iclass', 'kbID': 'P31v', 'canonical_right': 'MTV annual movie award'}], 'entities': []}
    """
    if if_graph_adheres(g, allowed_extensions={'multi_rel', 'qualifier_rel', 'v-structure'}):
        return g
    g = copy_graph(g, with_iclass=True)
    new_edgeset = []
    for edge in g.get('edgeSet', []):
        if edge.get("type") == 'time':
            edge['kbID'] = "P585v"
        elif "argmax" in edge:
            del edge['argmax']
            new_edgeset.append({"type": 'time', "kbID": "P585v", "argmax": 'time'})
        elif "argmin" in edge:
            del edge['argmin']
            new_edgeset.append({"type": 'time', "kbID": "P585v", "argmin": 'time'})
        elif "num" in edge:
            new_edgeset.append({"type": 'time', "kbID": "P585v", 'right': edge['num']})
            del edge['num']
        if edge.get("type") == 'iclass':
            for iclass in sorted(edge.get("canonical_right", []), key=len):
                new_edgeset.append({'type': 'iclass', 'kbID': edge.get("kbID"), 'canonical_right': iclass})
        else:
            new_edgeset.append(edge)
    g['edgeSet'] = new_edgeset
    return g
def graph_format_update ( g ) : if if_graph_adheres ( g , allowed_extensions = { 'multi_rel' , 'qualifier_rel' , 'v-structure' } ) : return g g = copy_graph ( g , with_iclass = True ) new_edgeset = [ ] for edge in g . get ( 'edgeSet' , [ ] ) : if edge . get ( "type" ) == 'time' : edge [ 'kbID' ] = "P585v" elif "argmax" in edge : del edge [ 'argmax' ] new_edgeset . append ( { "type" : 'time' , "kbID" : "P585v" , "argmax" : 'time' } ) elif "argmin" in edge : del edge [ 'argmin' ] new_edgeset . append ( { "type" : 'time' , "kbID" : "P585v" , "argmin" : 'time' } ) elif "num" in edge : new_edgeset . append ( { "type" : 'time' , "kbID" : "P585v" , 'right' : edge [ 'num' ] } ) del edge [ 'num' ] if edge . get ( "type" ) == 'iclass' : for iclass in sorted ( edge . get ( "canonical_right" , [ ] ) , key = len ) : new_edgeset . append ( { 'type' : 'iclass' , 'kbID' : edge . get ( "kbID" ) , 'canonical_right' : iclass } ) else : new_edgeset . append ( edge ) g [ 'edgeSet' ] = new_edgeset return g