<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tmpl_time(text, fmt, cur_fmt):
 """Format a time value using `strftime`. * synopsis: ``%time{date_time,format,curformat}`` * description: Return the date and time in any format accepted by \ strftime. For example, to get the year some music was added to \ your library, use %time{$added,%Y}. """

        return time.strftime(fmt, time.strptime(text, cur_fmt))