def replace_pattern(self, graph: nx.MultiDiGraph, match: dict):
    if (len(graph.in_edges(match['merge'].id)) <= 1):
        erase_node(match['merge'])
        erase_node(match['merge_data'])
        log.info("Useles Merge op and data nodes was deleted op='{}' data='{}'".format(match['merge'].id, match['merge_data'].id))
def replace_pattern(self, graph: nx.MultiDiGraph, match: dict):
    if (len(graph.in_edges(match['merge'].id)) <= 1):
        erase_node(match['merge'])
        erase_node(match['merge_data'])
        log.info("Useles Merge op and data nodes was deleted op='{}' data='{}'".format(match['merge'].id, match['merge_data'].id))