<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def templates_in(path):
 """Enumerate the templates found in path"""

    ext = '.cpp'
    return (
        Template(f[0:-len(ext)], load_file(os.path.join(path, f)))
        for f in os.listdir(path) if f.endswith(ext)
    )