human
Complete the below
def area():

    ''''REST controller for CAP area
    Should only be accessed for defining area template'
    '''
assistant
#Here is the Python code you requested.
    def prep(r):
        artable = s3db.cap_area
        artable.alert_id.readable = False
        artable.alert_id.writable = False
        artable.is_template.default = True
        s3.crud_strings['cap_area'] = Storage(label_create=T('Create    Predefined    Area'), title_display=T('Predefined    Area'), title_list=T('Predefined    Areas'), title_update=T('Edit    Predefined    Area'), title_upload=T('Import    Predefined    Areas'), label_list_button=T('List    Predefined    Areas'), label_delete_button=T('Delete    Predefined    Area'), msg_record_created=T('Predefined    Area    created'), msg_record_modified=T('Predefined    Area    modified'), msg_record_deleted=T('Predefined    Area    deleted'), msg_list_empty=T('No    Predefined    Areas    to    show'))
        list_fields = ['name', 'event_type_id']
        s3db.configure('cap_area', list_fields=list_fields)
        if (r.representation == 'json'):
            list_fields = ['id', 'name', 'event_type_id', (T('Event    Type'), 'event_type_id$name'), 'altitude', 'ceiling', 'location.location_id']
            s3db.configure('cap_area', list_fields=list_fields)
        elif (r.representation == 'xls'):
            s3db.gis_location.wkt.represent = None
            list_fields = [(T('Area    Description'), 'name'), (T('Event    Type'), 'event_type_id$name'), (T('WKT'), 'location.location_id$wkt'), 'altitude', 'ceiling']
            s3db.configure('cap_area', list_fields=list_fields)
        return True
    s3.prep = prep
    output = s3_rest_controller('cap', 'area', rheader=s3db.cap_rheader)
    return output