'Takes targeting info, identifies artifacts to fetch.
Args:
os_name: 0+ OS names.
cpe: 0+ CPE identifiers.
labels: 0+ GRR labels.
restrict_checks: A list of check ids whose artifacts should be fetched.
Returns:
the artifacts that should be collected.'

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

    results = set()
    for condition in cls.Conditions(None, os_name, cpe, labels):
        trigger = condition[1:]
        for chk in cls.checks.values():
            if (restrict_checks and (chk.check_id not in restrict_checks)):
                continue
            results.update(chk.triggers.Artifacts(*trigger))
    return results
