def _build_pcollection(self, pipeline, claim_filepath):
    """Build a beam pipeline to generate training examples.

    Args:
      pipeline: The pipeline configured with a runner
      claim_filepath: The path to read claims from

    Returns:
      Beam pipeline to compute examples
    """
    claims = util.read_jsonlines(claim_filepath)
    if not self._include_not_enough_info:
      claims = [c for c in claims if c['label'] != constants.NOT_ENOUGH_INFO]
    logging.info('Reading claims from: %s', claim_filepath)
    logging.info('n_similar_negatives=%s', self._n_similar_negatives)
    logging.info('n_background_negatives=%s', self._n_background_negatives)
    return (pipeline
            | 'LoadClaims' >> beam.Create(claims)
            | 'ReshuffleClaims' >> beam.Reshuffle()
            | 'ExtractEvidenceForEachClaim' >> beam.ParDo(
                ExtractEvidenceForClaim(
                    n_similar_negatives=self._n_similar_negatives,
                    n_background_negatives=self._n_background_negatives,
                    n_inference_candidates=self._n_inference_candidates,
                    n_inference_documents=self._n_inference_documents,
                    max_inference_sentence_id=self._max_inference_sentence_id,
                    wiki_db_path=self._wiki_db_path,
                    text_matcher_params_path=self._text_matcher_params_path,
                    title_in_scoring=self._title_in_scoring,
                    train_scrape_type=self._train_scrape_type,
                    ukp_docs_train=self._ukp_docs_train_path,
                    ukp_docs_dev=self._ukp_docs_dev_path,
                    ukp_docs_test=self._ukp_docs_test_path,
                    fever_train_path=self._fever_train,
                    fever_dev_path=self._fever_dev,
                    fever_test_path=self._fever_test,
                    drqa_db_path=self._drqa_db_path,
                    lucene_db_path=self._lucene_db_path,
                ))
            | 'ExampleWithId' >> beam.Map(lambda x: (x['example_id'], x))
            | 'ShuffleExamples' >> beam.Reshuffle())
Build a beam pipeline to generate training examples.

    Args:
      pipeline: The pipeline configured with a runner
      claim_filepath: The path to read claims from

    Returns:
      Beam pipeline to compute examples
    
language/serene/fever_tfds.py