def _clean_office(self, office):

        presidential_regex = re.compile('president', re.IGNORECASE)
        senate_regex = re.compile('(senate|senator)', re.IGNORECASE)
        house_regex = re.compile('(house|representative)', re.IGNORECASE)
        governor_regex = re.compile('governor', re.IGNORECASE)
        treasurer_regex = re.compile('treasurer', re.IGNORECASE)
        auditor_regex = re.compile('auditor', re.IGNORECASE)
        sos_regex = re.compile('secretary', re.IGNORECASE)
        lt_gov_regex = re.compile(r'(lt|Lt|Lieutenant)', re.IGNORECASE)
        ospi_regex = re.compile(
            'superintendent of public instruction',
            re.IGNORECASE)
        ag_regex = re.compile('attorney general', re.IGNORECASE)
        wcpl_regex = re.compile('commissioner of public lands', re.IGNORECASE)
        local_regex = re.compile(
            r'(\bState\b|Washington|Washington\s+State|Local|'
            'Legislative District)',
            re.IGNORECASE)
        national_regex = re.compile(
            r'(U\.S\.|\bUS\b|Congressional|National|United\s+States|U\.\s+S\.\s+)',
            re.IGNORECASE)

        if re.search(house_regex, office):
            if re.search(national_regex, office):
                return 'U.S. House of Representatives'
            elif re.search(local_regex, office):
                return 'State House of Representatives'
            else:
                return None
        elif re.search(governor_regex, office):
            return 'Governor'
        elif re.search(wcpl_regex, office):
            return 'Commissioner of Public Lands'
        elif re.search(senate_regex, office):
            if re.search(national_regex, office):
                return 'U.S. Senate'
            elif re.search(local_regex, office):
                return 'State Senate'
            else:
                return None
        elif re.search(lt_gov_regex, office):
            return 'Lieutenant Governor'
        elif re.search(ospi_regex, office):
            return 'Superintendent of Public Instruction'
        elif re.search(sos_regex, office):
            return 'Secretary of State'
        elif re.search(treasurer_regex, office):
            return 'Treasurer'
        elif re.search(auditor_regex, office):
            return 'Auditor'
        elif re.search(ag_regex, office):
            return 'Attorney General'
        elif re.search(presidential_regex, office):
            return 'President'
        else:
            return None
Change the user's Full Name
dataset/ETHPy150Open openelections/openelections-core/openelex/us/wa/transform/__init__.py/BaseTransform._clean_office--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/solaris_user.py/chfullname