docs: def ApplyParsersToResponses(parser_factory, responses, flow_obj):
    """Parse responses with applicable parsers.
  
    Args:
      parser_factory: A parser factory for specific artifact.
      responses: A list of responses from the client.
      flow_obj: An artifact collection flow.
  
    Returns:
      A list of (possibly parsed) responses.
    """
    # We have some processors to run.
    knowledge_base = flow_obj.state.knowledge_base
  
    parsed_responses = []
  
    if parser_factory.HasSingleResponseParsers():
      for response in responses:
        for parser in parser_factory.SingleResponseParsers():
          parsed_responses.extend(
              parser.ParseResponse(knowledge_base, response,
                                   flow_obj.args.path_type))
  
    for parser in parser_factory.MultiResponseParsers():
      parsed_responses.extend(parser.ParseResponses(knowledge_base, responses))
  
    has_single_file_parsers = parser_factory.HasSingleFileParsers()
    has_multi_file_parsers = parser_factory.HasMultiFileParsers()
  
    if has_single_file_parsers or has_multi_file_parsers:
      precondition.AssertIterableType(responses, rdf_client_fs.StatEntry)
      pathspecs = [response.pathspec for response in responses]
      if data_store.RelationalDBEnabled():
        # TODO(amoser): This is not super efficient, AFF4 provided an api to open
        # all pathspecs at the same time, investigate if optimizing this is worth
        # it.
        filedescs = []
        for pathspec in pathspecs:
          client_path = db.ClientPath.FromPathSpec(flow_obj.client_id, pathspec)
          filedescs.append(file_store.OpenFile(client_path))
      else:
        filedescs = MultiOpenAff4File(flow_obj, pathspecs)
  
    if has_single_file_parsers:
      for response, filedesc in zip(responses, filedescs):
        for parser in parser_factory.SingleFileParsers():
          parsed_responses.extend(
              parser.ParseFile(knowledge_base, response.pathspec, filedesc))
  
    if has_multi_file_parsers:
      for parser in parser_factory.MultiFileParsers():
        parsed_responses.extend(
            parser.ParseFiles(knowledge_base, pathspecs, filedescs))
  
    return parsed_responses or responses