code: def test_ensemble_chooses_highest_average_confidence_3(self):
      subresults = [
          {
              "span_start_probs": torch.FloatTensor(
                  [[0.0, 0.0, 0.9, 0.1]]
              ),
              "span_end_probs": torch.FloatTensor(
                  [[0.0, 0.0, 0.9, 0.1]]
              ),
              "best_span": torch.LongTensor([[2, 2]]),
              "best_span_str": "cheese",
              "question_tokens": ["What", "did", "Michael", "eat", "?"],
              "passage_tokens": ["Michael", "ate", "cheese", "."],
          },
          {
              "span_start_probs": torch.FloatTensor(
                  [[0.0, 0.0, 0.9, 0.1]]
              ),
              "span_end_probs": torch.FloatTensor(
                  [[0.0, 0.0, 0.9, 0.1]]
              ),
              "best_span": torch.LongTensor([[2, 2]]),
              "best_span_str": "cheese",
              "question_tokens": ["What", "did", "Michael", "eat", "?"],
              "passage_tokens": ["Michael", "ate", "cheese", "."],
          },
          {
              "span_start_probs": torch.FloatTensor(
                  [[0.9, 0.0, 0.0, 0.0]]
              ),
              "span_end_probs": torch.FloatTensor(
                  [[0.9, 0.0, 0.0, 0.0]]
              ),
              "best_span": torch.LongTensor([[0, 0]]),
              "best_span_str": "What",
              "question_tokens": ["What", "did", "Michael", "eat", "?"],
              "passage_tokens": ["Michael", "ate", "cheese", "."],
          },
      ]
  
      numpy.testing.assert_almost_equal(
          ensemble(subresults).data[0].cpu().numpy(),
          torch.LongTensor([2, 2]).numpy(),
      )
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/models/reading_comprehension/bidaf_ensemble_test.py
imports: from __future__ import division
  from __future__ import absolute_import
  import numpy
  import torch
  from allennlp.common.testing import ModelTestCase
  from allennlp.data.dataset import Batch
  from allennlp.models.reading_comprehension.bidaf_ensemble import BidafEnsemble, ensemble
label_desc: Use image node_id 3 for calling the BidafEnsembleTest obj's underlying member method code with example usage: obj.test_ensemble_chooses_highest_average_confidence_3() without return types