<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def route(method, pattern, handler=None):
 """register a routing rule Example: route('GET', '/path/<param>', handler) """

    if handler is None:
        return partial(route, method, pattern)
    return routes.append(method, pattern, handler)