code: def test_span_performance(span_inference_result, caplog=None):
      if caplog:
          caplog.set_level(logging.CRITICAL)
  
      best_pred = span_inference_result.prediction[0]
  
      assert best_pred.answer == "GameTrailers"
  
      best_score_gold = 13.4205
      best_score = best_pred.score
      assert isclose(best_score, best_score_gold, rel_tol=0.001)
  
      no_answer_gap_gold = 13.9827
      no_answer_gap = span_inference_result.no_answer_gap
      assert isclose(no_answer_gap, no_answer_gap_gold, rel_tol=0.001)
  
imports: import logging
  from pathlib import Path
  import pytest
  from math import isclose
  import numpy
  from farm.data_handler.processor import SquadProcessor
  from farm.modeling.adaptive_model import AdaptiveModel
  from farm.infer import QAInferencer
  from farm.data_handler.inputs import QAInput, Question
label_desc: Use image node_id 8 for calling a global function with example usage: test_span_performance(span_inference_result, caplog) without return types