code: def test_level_trend_issm_h():
      issm = LevelTrendISSM()
  
      assert issm.latent_dim() == 2
      assert issm.output_dim() == 1
  
      time_features = issm.time_features()
  
      assert len(time_features) == 1
  
      time_indices = [
          pd.date_range("2020-01-01 21:00:00", periods=10, freq="H"),
          pd.date_range("2020-01-31 22:00:00", periods=10, freq="H"),
      ]
  
      features = mx.nd.array(
          np.stack(
              [
                  np.stack(
                      [f(time_index) for f in time_features], axis=-1
                  )
                  for time_index in time_indices
              ],
              axis=0,
          )
      )
  
      (
          emission_coeff,
          transition_coeff,
          innovation_coeff,
      ) = issm.get_issm_coeff(features)
  
      assert (
          (
              emission_coeff
              == mx.nd.ones(
                  (2, 10, issm.output_dim(), issm.latent_dim())
              )
          )
          .asnumpy()
          .all()
      )
  
      for item in range(2):
          for time in range(10):
              sliced_transition_coeff = mx.nd.slice(
                  transition_coeff,
                  begin=(item, time, None, None),
                  end=(item + 1, time + 1, None, None),
              )
              assert (
                  (
                      sliced_transition_coeff
                      == mx.nd.array([[1.0, 1.0], [0.0, 1.0]])
                  )
                  .asnumpy()
                  .all()
              )
  
      assert (
          (innovation_coeff == mx.nd.ones((2, 10, issm.latent_dim())))
          .asnumpy()
          .all()
      )
  
file_path: gluonts/test/mx/model/deepstate/test_issm.py
imports: import mxnet
  import numpy
  import pandas
  from gluonts.mx.model.deepstate.issm import CompositeISSM, LevelISSM, LevelTrendISSM, SeasonalityISSM, ZeroFeature
  from gluonts.time_feature import day_of_week_index, month_of_year_index
label_desc: Use image node_id 3 for calling a global function with example usage: test_level_trend_issm_h() without return types