<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def view(db_name):
 """ Register a map function as a view Currently, only a single map function can be created for each view NOTE: the map function source is saved in CouchDB, so it cannot depend on anything outside the function's scope. :param db_name: the database name """

    def decorator(func):
        v = View(db_name, func)
        v.register()
        return v
    return decorator