def METHOD_NAME(
    client_id: Text,
    flow_id: Text,
) -> Iterator[rdf_osquery.OsqueryResult]:
  """Fetches results for given client and flow ids."""
  next_to_fetch = 0
  last_fetched_count = None
  while last_fetched_count != 0:
    data_fetched = data_store.REL_DB.ReadFlowResults(
        offset=next_to_fetch,
        count=_RESULTS_TO_FETCH_AT_ONCE,
        client_id=client_id,
        flow_id=flow_id)
    last_fetched_count = len(data_fetched)
    next_to_fetch += last_fetched_count
    for datum in data_fetched:
      if not isinstance(datum.payload, rdf_osquery.OsqueryResult):
        # TODO(user): Cover the cases when the flow yields other result
        # types (at the moment of writing this, file collection results need to
        # be considered too).
        raise ValueError(f"Incorrect payload type: {type(datum.payload)}")
      yield datum.payload