<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def time_methods(obj, methods, prefix=None):
 """ Patch obj so calls to given methods are timed 'ok' 'ok' """

    if prefix:
        prefix = prefix + '.'
    else:
        prefix = ''

    for method in methods:
        current_method = getattr(obj, method)
        new_method = timed(prefix)(current_method)
        setattr(obj, method, new_method)