code: def test_qa_candidate_attributes(span_inference_result, caplog=None):
      if caplog:
          caplog.set_level(logging.CRITICAL)
  
      qa_candidate = span_inference_result.prediction[0]
      attributes_gold = [
          "add_cls",
          "aggregation_level",
          "answer",
          "answer_support",
          "answer_type",
          "context_window",
          "n_passages_in_doc",
          "offset_answer_end",
          "offset_answer_start",
          "offset_answer_support_end",
          "offset_answer_support_start",
          "offset_context_window_end",
          "offset_context_window_start",
          "offset_unit",
          "passage_id",
          "probability",
          "score",
          "set_answer_string",
          "set_context_window",
          "to_doc_level",
          "to_list",
      ]
  
      for ag in attributes_gold:
          assert ag in dir(qa_candidate)
  
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 11 for calling a global function with example usage: test_qa_candidate_attributes(span_inference_result, caplog) without return types