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

    """Membership controller
    - uses the group_membership table from PR
    """
    s3db.hrm_configure_pr_group_membership()
    table = db.pr_group_membership
    s3db.configure('pr_group_membership', list_fields=['group_id', 'group_id$description', 'group_head', 'person_id$first_name', 'person_id$middle_name', 'person_id$last_name', (T('Email'), 'person_id$email.value'), (settings.get_ui_label_mobile_phone(), 'person_id$phone.value')])
    gtable = db.pr_group
    htable = s3db.hrm_human_resource
    s3.filter = ((((gtable.system == False) & (gtable.group_type == 3)) & (htable.type == 2)) & (htable.person_id == table.person_id))
    def prep(r):
        if (r.method in ('create', 'create.popup', 'update', 'update.popup')):
            person_id = get_vars.get('~.person_id', None)
            if person_id:
                field = table.person_id
                field.default = person_id
                field.readable = field.writable = False
        return True
    s3.prep = prep
    return s3_rest_controller('pr', 'group_membership', csv_stylesheet=('hrm', 'group_membership.xsl'), csv_template=('hrm', 'group_membership'))