human
Complete the below
def household():

    ''''RESTful Controller for Household Model'
    '''
assistant
#Here is the Python code you requested.
    def prep(r):
        record = r.record
        if (r.component_name == 'person'):
            s3db.add_components('pr_person', po_age_group={'joinby': 'person_id', 'multiple': False})
            crud_form = s3base.S3SQLCustomForm('first_name', 'middle_name', 'last_name', 'gender', 'age_group.age_group')
            list_fields = ['first_name', 'middle_name', 'last_name', 'gender', 'age_group.age_group']
            s3db.configure('pr_person', crud_form=crud_form, list_fields=list_fields)
            crud_strings = s3.crud_strings['pr_person']
            crud_strings['label_create'] = T('Add    Household    Member')
        elif (record and (r.component_name == 'organisation_household')):
            table = r.component.table
            otable = s3db.org_organisation
            rtable = s3db.po_referral_organisation
            atable = s3db.po_organisation_area
            query = ((rtable.id != None) & ((atable.area_id == record.area_id) | (atable.area_id == None)))
            left = [rtable.on(((rtable.organisation_id == otable.id) & (rtable.deleted != True))), atable.on(((atable.organisation_id == otable.id) & (atable.deleted != True)))]
            table.organisation_id.requires = IS_ONE_OF(db(query), 'org_organisation.id', atable.organisation_id.represent, left=left, error_message=T('Agency    is    required'))
        return True
    s3.prep = prep
    def postp(r, output):
        if (isinstance(output, dict) and ('buttons' in output)):
            buttons = output['buttons']
            if ('summary_btn' in buttons):
                buttons['list_btn'] = buttons['summary_btn']
        return output
    s3.postp = postp
    return s3_rest_controller(rheader=s3db.po_rheader)