code: def test_average_aggregator():
      """Test the AverageAggregator
  
      - Test the AverageAggregator correctly aggregates data passed to it.
      - Test the AverageAggregator can be torch scripted
      """
      aggregator = ensemble.AverageAggregator()
      scores = torch.randn((3, 10))
  
      # test the aggregator correctly averages the scores
      aggregated_scores = aggregator(scores)
      assert torch.all(
          torch.isclose(aggregated_scores, scores.mean(dim=1))
      )
      assert aggregated_scores.shape == (3,)
  
      # test the scriptability of the aggregator
      aggregator = torch.jit.script(aggregator)
      aggregated_scores_2 = aggregator(scores)
      assert torch.all(aggregated_scores_2 == aggregated_scores)
  
file_path: alibi-detect/alibi_detect/od/tests/test_ensemble.py
imports: import pytest
  import torch
  from alibi_detect.od.pytorch import ensemble
  from alibi_detect.exceptions import NotFittedError
label_desc: Use image node_id 3 for calling a global function with example usage: test_average_aggregator() without return types