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

    """Case Activities: RESTful CRUD Controller
    """
    def prep(r):
        resource = r.resource
        if settings.get_dvr_case_activity_use_status():
            s3db.dvr_case_activity_default_status()
            status_field = 'status_id'
        else:
            status_field = 'completed'
        if settings.get_dvr_manage_response_actions():
            s3db.dvr_response_default_status()
        if (not r.record):
            query = (FS('person_id$dvr_case.archived') == False)
            resource.add_filter(query)
            mine = r.get_vars.get('mine')
            if (mine == '1'):
                s3.crud_strings['dvr_case_activity']['title_list'] = T('My    Activities')
                human_resource_id = auth.s3_logged_in_human_resource()
                if human_resource_id:
                    query = (FS('human_resource_id') == human_resource_id)
                else:
                    query = FS('human_resource_id').belongs(set())
                resource.add_filter(query)
        list_fields = ['case_id$reference', 'person_id$first_name', 'person_id$last_name', 'need_id', 'need_details', 'emergency', 'activity_details', 'followup', 'followup_date', status_field]
        resource.configure(list_fields=list_fields, insertable=False, deletable=False)
        return True
    s3.prep = prep
    return s3_rest_controller()