def plot_normal_decomposition(decomp: str):
    normalizer = NormalizedGraphMatchScorer()
    decomposition = Decomposition.from_str(decomp)
    print("decomposition:", decomposition.to_string())
    norm_decomposition = normalizer.normalized_decomposition(decomposition,
                                                             verbose=True)
    print("normal form:", norm_decomposition.to_string())
    print("=========================================================")
    draw_decomposition_graph(decomposition.to_graph(), title="decomposition")
    draw_decomposition_graph(norm_decomposition.to_graph(),
                             title="normal form")
    def predictions_to_norm(df, qdmr_col, norm_col):
        df[norm_col] = df[qdmr_col]

        for index, row in df.iterrows():
            dec = row[norm_col]
            try:
                decomposition = norm_g.normalized_decomposition(
                    Decomposition.from_str(dec))
                df.loc[index, norm_col] = decomposition.to_string()
            except Exception as ex:
                print(f"error in index {index}:{str(ex)}\n{dec}", flush=True)
                traceback.print_exc()
                df.loc[index, norm_col] = "ERROR"