code: def test_all_hyperparameters(sagemaker_session):
      ntm = NTM(
          sagemaker_session=sagemaker_session,
          encoder_layers=[1, 2, 3],
          epochs=3,
          encoder_layers_activation="tanh",
          optimizer="sgd",
          tolerance=0.05,
          num_patience_epochs=2,
          batch_norm=False,
          rescale_gradient=0.5,
          clip_gradient=0.5,
          weight_decay=0.5,
          learning_rate=0.5,
          **ALL_REQ_ARGS,
      )
      assert ntm.hyperparameters() == dict(
          num_topics=str(ALL_REQ_ARGS["num_topics"]),
          encoder_layers="[1, 2, 3]",
          epochs="3",
          encoder_layers_activation="tanh",
          optimizer="sgd",
          tolerance="0.05",
          num_patience_epochs="2",
          batch_norm="False",
          rescale_gradient="0.5",
          clip_gradient="0.5",
          weight_decay="0.5",
          learning_rate="0.5",
      )
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, patch
  from sagemaker import image_uris
  from sagemaker.amazon.ntm import NTM, NTMPredictor
  from sagemaker.amazon.amazon_estimator import RecordSet
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 4 for calling a global function with example usage: test_all_hyperparameters(sagemaker_session) without return types