def process(self, claim_json, *args,
              **kwargs):
    """Convert a json claim to a list of claim-evidence example pairs.

    Sketch of this method:
    1. Get the gold examples for the claim
    2. Get the retrieved examples for the claim
    3. Get the background examples for the claim

    Then:
    4. Deduplicate the gold and retrieved examples, maintaining track of where
      they came from
    5. Score the (large) list of gold/retrieved examples with a sentence matcher
    6. Sort by this, and cut to the top evidence
    7. Find any gold evidence not in the top evidence, mark that it was excluded
      And re-add it back if in whole-wiki scenario

    Args:
      claim_json: The claim json from fever
      *args: API Compat
      **kwargs: API Compat

    Returns:
      A list of json formatted examples for the tensorflow dataset
    """
    claim_id = claim_json['id']
    fold = self._claim_to_fold[claim_id]
    if fold == 'train':
      fold_examples = self._create_train_examples(claim_json)
    elif fold == 'test':
      fold_examples = []
      fold_examples.extend(
          self._create_test_examples(
              claim_json=claim_json,
              scrape_type=constants.DRQA,
              n_inference_candidates=self._n_inference_candidates))
      fold_examples.extend(
          self._create_test_examples(
              claim_json=claim_json,
              scrape_type=constants.LUCENE,
              n_inference_candidates=self._n_inference_candidates))
      fold_examples.extend(
          self._create_test_examples(
              claim_json=claim_json,
              scrape_type=constants.UKP_PRED,
              n_inference_candidates=self._n_inference_candidates))
      fold_examples.extend(
          self._create_test_examples(
              claim_json=claim_json,
              scrape_type=constants.UKP_WIKI,
              n_inference_candidates=self._n_inference_candidates))
    elif fold == 'dev':
      fold_examples = []
      fold_examples.extend(
          self._create_validation_examples(
              claim_json=claim_json,
              scrape_type=constants.DRQA,
              n_inference_candidates=self._n_inference_candidates))
      fold_examples.extend(
          self._create_validation_examples(
              claim_json=claim_json,
              scrape_type=constants.LUCENE,
              n_inference_candidates=self._n_inference_candidates))
      fold_examples.extend(
          self._create_validation_examples(
              claim_json=claim_json,
              scrape_type=constants.UKP_PRED,
              n_inference_candidates=self._n_inference_candidates))
      fold_examples.extend(
          self._create_validation_examples(
              claim_json=claim_json,
              scrape_type=constants.UKP_WIKI,
              n_inference_candidates=self._n_inference_candidates))
    else:
      raise ValueError(f'Invalid fold: {fold} for\n{claim_json}')

    serialized_examples = []
    for idx, example in enumerate(fold_examples):
      scrape_type = example['scrape_type']
      metadata = {
          'claim_id': claim_id,
          'claim_label': example['claim_label'],
          'evidence_label': example['evidence_label'],
          'doc_score': example.get('doc_score', -1),
          'sentence_score': example['sentence_score'],
          'scrape_type': scrape_type,
          'gold': example['gold'],
          'retrieved': example['retrieved'],
          'background': example['background'],
          'tfidf_candidate': example['tfidf_candidate'],
          'wikipedia_url': example['wikipedia_url'],
          'sentence_id': example['sentence_id'],
      }
      serialized_examples.append(
          dict(
              example_id=f'{claim_id}-{idx}-{scrape_type}',
              claim_text=claim_json['claim'],
              evidence_text=example['evidence_text'],
              wikipedia_url=example['wikipedia_url'],
              sentence_id=str(example['sentence_id']),
              evidence_label=example['evidence_label'],
              claim_label=example['claim_label'],
              scrape_type=scrape_type,
              metadata=json.dumps(metadata),
          ))
    return serialized_examples
Convert a json claim to a list of claim-evidence example pairs.

    Sketch of this method:
    1. Get the gold examples for the claim
    2. Get the retrieved examples for the claim
    3. Get the background examples for the claim

    Then:
    4. Deduplicate the gold and retrieved examples, maintaining track of where
      they came from
    5. Score the (large) list of gold/retrieved examples with a sentence matcher
    6. Sort by this, and cut to the top evidence
    7. Find any gold evidence not in the top evidence, mark that it was excluded
      And re-add it back if in whole-wiki scenario

    Args:
      claim_json: The claim json from fever
      *args: API Compat
      **kwargs: API Compat

    Returns:
      A list of json formatted examples for the tensorflow dataset
    
language/serene/fever_tfds.py