def normalize_party(header):

    regex = re.compile(
        r'.*(\bparty\b|party.*code|candidate(_|\s+)party(_|\s)id).*',
        re.IGNORECASE)

    """
    `return filter(lambda x: regex.search(x), header)[0]`
    does the same as the below list comprehension

    """

    return filter(lambda x: regex.search(x), header)[0]
alert when an IAM Role has a policy allowing 'iam:*'.
dataset/ETHPy150Open openelections/openelections-core/openelex/us/wa/load.py/normalize_party--crossover with--dataset/ETHPy150Open Netflix/security_monkey/security_monkey/auditors/iam/iam_role.py/IAMRoleAuditor.check_iam_star_privileges