def METHOD_NAME(inpath, outpath, **args):
    try:
        template = Template(filename=inpath)
        rendered = template.render(**args)
        rendered = re.sub(r"\r\n", r"\n", rendered)
        with open(outpath, 'w') as fout:
            fout.write(rendered)
        makoFileList.append(outpath)
        return len(rendered.splitlines())
    except:
        traceback = RichTraceback()
        #for (filename, lineno, function, line) in traceback.traceback:
        #    print("%s(%s) : error in %s" % (filename, lineno, function))
        #    print(line, "\n")
        line = "%s: %s" % (str(traceback.error.__class__.__name__), traceback.error)
        makoErrorList.append(line)
        print(line)
        raise