code: def test_qa_pred_attributes(span_inference_result, caplog=None):
      if caplog:
          caplog.set_level(logging.CRITICAL)
  
      qa_pred = span_inference_result
      attributes_gold = [
          "aggregation_level",
          "answer_types",
          "context",
          "context_window_size",
          "ground_truth_answer",
          "id",
          "n_passages",
          "no_answer_gap",
          "prediction",
          "question",
          "to_json",
          "to_squad_eval",
          "token_offsets",
      ]
  
      for ag in attributes_gold:
          assert ag in dir(qa_pred)
  
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 10 for calling a global function with example usage: test_qa_pred_attributes(span_inference_result, caplog) without return types