code: def test_TemporalActivationRegularizationLoss(beta: float):
      tar = TemporalActivationRegularizationLoss(
          beta, time_axis=1, batch_axis=0
      )
      inputs = [
          nd.arange(1000).reshape(10, 10, 10),
          nd.arange(1000).reshape(10, 10, 10),
          nd.arange(1000).reshape(10, 10, 10),
      ]
      tar_result = tar(*inputs)
      outputs = [
          beta
          * nd.mean(
              (array[:, 1:, :] - array[:, :-1, :]).__pow__(2),
              axis=0,
              exclude=True,
          )
          for array in inputs
      ]
      assert np.isclose(
          nd.add_n(*outputs).asnumpy(), tar_result.asnumpy()
      ).all()
  
imports: import numpy
  import pytest
  from mxnet import nd
  from gluonts.mx.block.regularization import ActivationRegularizationLoss, TemporalActivationRegularizationLoss
label_desc: Use image node_id 2 for calling a global function with example usage: test_TemporalActivationRegularizationLoss(beta) without return types