def mk_conf_str(conf):
    """
    Formats configuration in HEG program format.
    """
    conf_str = "\n".join([
        "{} = {}".format(k.upper(), v) for k, v in conf.items()
    ])
    conf_str = "\n".join([
        "",
        "NUM_RUNS = 1",
        "",
        "BEGIN",
        conf_str,
        "END",
        ""
    ])
    return conf_str