'Get processed data, mapped to artifacts.
Identifies the artifacts that should be collected based on the os and labels
of the client machine.
Artifacts are acquired from the CheckRegistry as a dict, with artifact names
as keys and a list of the parsers required by the checks as values.  These
are used to only trigger the parsers required for the checks in cases where
multiple parsers can be applied, and to parse the results once, rather than
re-parse them within each check that uses the results.
Args:
responses: Input from previous states as an rdfvalue.Dict'

@flow.StateHandler()
def MapArtifactData(self, responses):

    self.state.artifacts_wanted = checks.CheckRegistry.SelectArtifacts(os_name=self.state.knowledge_base.os, restrict_checks=self.args.restrict_checks)
    for artifact_name in self.state.artifacts_wanted:
        self.CallFlow(collectors.ArtifactCollectorFlow.__name__, artifact_list=[artifact_name], apply_parsers=False, request_data={'artifact_name': artifact_name}, next_state='AddResponses')
    self.CallState(next_state='RunChecks')
