'Create AFF4 objects for registry statentries.
We need to do this explicitly because we call StatFile client action
directly for performance reasons rather than using one of the flows that do
this step automatically.
Args:
responses: Response objects from the artifact source.'

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

    if responses.success:
        new_responses = []
        for response in responses:
            filesystem.CreateAFF4Object(response, self.client_id, self.token)
            new_responses.append(response)
        self.CallStateInline(next_state='ProcessCollected', request_data=responses.request_data, messages=new_responses)
    else:
        self.CallStateInline(next_state='ProcessCollected', responses=responses)
