#NEWLINE# def get_or_create_nd( cur , parent , properties , * args , **kwargs ) : #NEWLINE# #INDENT# xtype = properties . get ( 'type' ) #NEWLINE# node_id = node_ids . get ( xtype , None ) #NEWLINE# if ( node_id is None ) : #NEWLINE# #INDENT# node = insert_node ( cur , parent , * args , properties = node , ** kwargs ) #NEWLINE# node_ids [ xtype ] = node . id #NEWLINE# return node #NEWLINE# #UNINDENT# return get_node ( cur , node_id )