def _get_background_candidates(
      self, *, claim_label, used_wikipedia_urls,
      scrape_type):
    """Return background negatives (ie random from wikipedia).

    During inference, we should not get these, hence the shortcut.

    Args:
      claim_label: The label of the fever claim
      used_wikipedia_urls: The wikipedia urls used so far
      scrape_type: What type to label background as, technically this isn't that
        scrape type, but it makes grouping by scrape type easier to do later on.

    Returns:
      A list of background candidates and updated wikipedia urls used.
      Does not mutate the original
    """
    used_wikipedia_urls = set(used_wikipedia_urls)
    background_candidates = []
    while True:
      if len(background_candidates) >= self._n_background_negatives:
        break
      wikipedia_url = random.sample(self._wiki_titles, 1)[0]
      if wikipedia_url in used_wikipedia_urls:
        continue
      used_wikipedia_urls.add(wikipedia_url)
      page = self._wiki_db.get_page(wikipedia_url)
      if page is None:
        raise ValueError(f'Missing page: {wikipedia_url}')
      sentence_candidates = list(page.sentences.keys())
      if not sentence_candidates:  # len(sentence_candidates) == 0
        continue
      sentence_id = random.choice(list(page.sentences.keys()))
      sentence = page.sentences[sentence_id].text
      sentence_with_title = underscore_to_whitespace(
          wikipedia_url) + ' ' + sentence
      background_candidates.append({
          'evidence_text': sentence,
          'evidence_text_with_title': sentence_with_title,
          'evidence_label': constants.NOT_MATCHING,
          'claim_label': claim_label,
          'gold': False,
          'retrieved': False,
          'background': True,
          'tfidf_candidate': False,
          'wikipedia_url': wikipedia_url,
          'sentence_id': sentence_id,
          'doc_score': -1,
          'scrape_type': scrape_type,
      })
    return background_candidates, used_wikipedia_urls
Return background negatives (ie random from wikipedia).

    During inference, we should not get these, hence the shortcut.

    Args:
      claim_label: The label of the fever claim
      used_wikipedia_urls: The wikipedia urls used so far
      scrape_type: What type to label background as, technically this isn't that
        scrape type, but it makes grouping by scrape type easier to do later on.

    Returns:
      A list of background candidates and updated wikipedia urls used.
      Does not mutate the original
    
language/serene/fever_tfds.py