def METHOD_NAME(tplfile, outfile, sbox):
    tpl = ""
    with open(tplfile, 'rb') as fd:
        tpl = fd.read()
    for s in sbox.keys():
        tpl = tpl.replace(str.encode(
            "{{" + s + "}}", "utf8"), str.encode(str.strip(sbox[s]), "utf8"))
    with open(outfile, 'wb') as fd:
        fd.write(tpl)