code: def test_high_dim(shape: tuple, axis):
      batch_count = 3
  
      value_stream = [
          np.random.random(shape) for _ in range(batch_count)
      ]
      all_values = np.concatenate(value_stream)
  
      sum = Sum(axis=axis)
      for values in value_stream:
          sum.step(values)
  
      actual_sum = sum.get()
      expected_sum = all_values.sum(axis=axis)
      np.testing.assert_almost_equal(actual_sum, expected_sum)
  
      mean = Mean(axis=axis)
      for values in value_stream:
          mean.step(values)
  
      actual_mean = mean.get()
      expected_mean = all_values.mean(axis=axis)
      np.testing.assert_almost_equal(actual_mean, expected_mean)
  
imports: import numpy
  import pytest
  from gluonts.ev.aggregations import Mean, Sum
  from gluonts.itertools import power_set
label_desc: Use image node_id 3 for calling a global function with example usage: test_high_dim(shape, axis) without return types