code: def test_no_answer_performance(
      no_answer_inference_result, caplog=None
  ):
      if caplog:
          caplog.set_level(logging.CRITICAL)
      best_pred = no_answer_inference_result.prediction[0]
  
      assert best_pred.answer == "no_answer"
  
      best_score_gold = 12.1445
      best_score = best_pred.score
      assert isclose(best_score, best_score_gold, rel_tol=0.001)
  
      no_answer_gap_gold = -14.4646
      no_answer_gap = no_answer_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 9 for calling a global function with example usage: test_no_answer_performance(no_answer_inference_result, caplog) without return types