human
Complete this python program:
def event():
assistant
#Here is the Python code you requested.

    """RESTful CRUD controller
    """
    def prep(r):
        if r.interactive:
            method = r.method
            if r.component:
                cname = r.component_name
                if (cname == 'req'):
                    if ((method != 'update') and (method != 'read')):
                        s3db.req_create_form_mods()
                elif (cname == 'response'):
                    s3.crud_strings['dc_response'].label_create = T('Add    Assessment')
                elif (cname == 'target'):
                    s3.crud_strings['dc_target'].label_create = T('Add    Target')
            elif (method in ('create', 'list', 'summary')):
                r.table.closed.writable = r.table.closed.readable = False
        return True
    s3.prep = prep
    return s3_rest_controller(rheader=s3db.event_rheader)