code: def compute_predictions_logits_v3(
      data_rows: List[Union[PartialDataRow, DataRow]],
      logits: np.ndarray,
      n_best_size,
      max_answer_length,
      do_lower_case,
      version_2_with_negative,
      null_score_diff_threshold,
      tokenizer,
      skip_get_final_text=False,
      verbose=True,
  ):
      """Write final predictions to the json file and log-odds of null if needed."""
      partial_examples = data_rows_to_partial_examples(data_rows)
      all_pred_results = logits_to_pred_results_list(logits)
      predictions = squad_utils.compute_predictions_logits_v2(
          partial_examples=partial_examples,
          all_results=all_pred_results,
          n_best_size=n_best_size,
          max_answer_length=max_answer_length,
          do_lower_case=do_lower_case,
          version_2_with_negative=version_2_with_negative,
          null_score_diff_threshold=null_score_diff_threshold,
          tokenizer=tokenizer,
          verbose=verbose,
          skip_get_final_text=skip_get_final_text,
      )
      results = squad_utils.squad_evaluate(
          partial_examples, predictions
      )
      return results, predictions
  
imports: import json
  import numpy
  import torch
  from dataclasses import dataclass
  from typing import Union, List, Dict, Optional
  from transformers.models.bert.tokenization_bert import whitespace_tokenize
  from transformers.tokenization_utils_base import TruncationStrategy
  from jiant.tasks.lib.templates.squad_style import utils
  from jiant.shared.constants import PHASE
  from jiant.tasks.core import BaseExample, BaseDataRow, BatchMixin, Task, TaskTypes
  from jiant.utils.python.datastructures import ExtendedDataClassMixin
  from jiant.utils.display import maybe_tqdm
  import logging
label_desc: Use image node_id 7 for calling a global function with example usage: compute_predictions_logits_v3(data_rows, logits, n_best_size, max_answer_length, do_lower_case, version_2_with_negative, null_score_diff_threshold, tokenizer, skip_get_final_text, verbose) and returns: results,  predictions