human
I wrote the below code

    if (r.representation != 'html'):
        return None
    from s3 import s3_rheader_resource, S3ResourceHeader
    (tablename, record) = s3_rheader_resource(r)
    if (tablename != r.tablename):
        resource = current.s3db.resource(tablename, id=record.id)
    else:
        resource = r.resource
    rheader = None
    rheader_fields = []
    if record:
        T = current.T
        if (tablename == 'org_facility'):
            if (not tabs):
                tabs = [(T('Basic    Details'), None), (T('Rooms'), 'room')]
                def facility_type_lookup(record):
                    db = current.db
                    ltable = db.org_site_facility_type
                    ttable = db.org_facility_type
                    query = ((ltable.site_id == record.site_id) & (ltable.facility_type_id == ttable.id))
                    rows = db(query).select(ttable.name)
                    if rows:
                        return ',    '.join([row.name for row in rows])
                    else:
                        return current.messages['NONE']
                rheader_fields = [['name', 'organisation_id', 'email'], [(T('Facility    Type'), facility_type_lookup), 'location_id', 'phone1']]
        rheader = S3ResourceHeader(rheader_fields, tabs)(r, table=resource.table, record=record)
    return rheader

What's a good function header?
assistant
#Here's a good function header.

def stl_org_rheader(r, tabs=[]):