'Takes targeting info, identifies relevant checks.
FindChecks will return results when a host has the conditions necessary for
a check to occur. Conditions with partial results are not returned. For
example, FindChecks will not return checks that if a check targets
os_name=["Linux"], labels=["foo"] and a host only has the os_name=["Linux"]
attribute.
Args:
artifact: 0+ artifact names.
os_name: 0+ OS names.
cpe: 0+ CPE identifiers.
labels: 0+ GRR labels.
restrict_checks: A list of check ids to restrict check processing to.
Returns:
the check_ids that apply.'

@classmethod
def FindChecks(cls, artifact=None, os_name=None, cpe=None, labels=None, restrict_checks=None):

    check_ids = set()
    conditions = list(cls.Conditions(artifact, os_name, cpe, labels))
    for (chk_id, chk) in cls.checks.iteritems():
        if (restrict_checks and (chk_id not in restrict_checks)):
            continue
        for condition in conditions:
            if chk.triggers.Match(*condition):
                check_ids.add(chk_id)
                break
    return check_ids
