def METHOD_NAME(self, spec, prefix):
    def set_parameter(name, value):
        config_files.filter(
            "^#?[ ]*" + name + "[ ]*=.*$", name + " = " + value, ignore_absent=True
        )
    config_files = FileFilter(
        join_path("input", ".mg5_configuration_default.txt"),
        join_path("input", "mg5_configuration.txt"),
    )
    set_parameter("syscalc_path", spec["syscalc"].prefix.bin)
    if "+ninja" in spec:
        set_parameter("ninja", spec["gosam-contrib"].prefix)
    if "+collier" in spec:
        set_parameter("collier", spec["collier"].prefix.lib)
    set_parameter("output_dependencies", "internal")
    set_parameter("lhapdf", join_path(spec["lhapdf"].prefix.bin, "lhapdf-config"))
    set_parameter("fastjet", join_path(spec["fastjet"].prefix.bin, "fastjet-config"))
    set_parameter("automatic_html_opening", "False")