code: def test_mean(s, target, observed, expected_scale):
      target_scaled, scale, _ = s(target, observed, None, [])
      scale = mx.nd.reshape(scale, shape=(len(scale),))
  
      assert np.allclose(
          expected_scale.asnumpy(), scale.asnumpy()
      ), "mismatch in the scale computation"
  
      expected_target_scaled = mx.nd.broadcast_div(
          target, expected_scale.expand_dims(axis=1)
      )
  
      assert np.allclose(
          expected_target_scaled.asnumpy(), target_scaled.asnumpy()
      ), "mismatch in the scaled target computation"
  
imports: import mxnet
  import numpy
  import pytest
  from gluonts.mx.representation import MeanScaling
label_desc: Use image node_id 1 for calling a global function with example usage: test_mean(s, target, observed, expected_scale) without return types