def METHOD_NAME(app):
    app.builder.build_all()
    assert (app.outdir / 'prolog_epilog_substitution.pot').is_file()
    pot = (app.outdir / 'prolog_epilog_substitution.pot').read_text(encoding='utf8')
    msg_ids = list(filter(None, map(msgid_getter, pot.splitlines())))
    assert msg_ids == [
        "i18n with prologue and epilogue substitutions",
        "This is content that contains |subst_prolog_1|.",
        "Substituted image |subst_prolog_2| here.",
        "subst_prolog_2",
        ".. image:: /img.png",
        "This is content that contains |subst_epilog_1|.",
        "Substituted image |subst_epilog_2| here.",
        "subst_epilog_2",
        ".. image:: /i18n.png",
    ]