code: def test_all_hyperparameters(sagemaker_session):
      kmeans = KMeans(
          sagemaker_session=sagemaker_session,
          init_method="random",
          max_iterations=3,
          tol=0.5,
          num_trials=5,
          local_init_method="kmeans++",
          half_life_time_size=0,
          epochs=10,
          center_factor=2,
          eval_metrics=["msd", "ssd"],
          **ALL_REQ_ARGS,
      )
      assert kmeans.hyperparameters() == dict(
          k=str(ALL_REQ_ARGS["k"]),
          init_method="random",
          local_lloyd_max_iter="3",
          local_lloyd_tol="0.5",
          local_lloyd_num_trials="5",
          local_lloyd_init_method="kmeans++",
          half_life_time_size="0",
          epochs="10",
          extra_center_factor="2",
          eval_metrics='["msd", "ssd"]',
          force_dense="True",
      )
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, patch
  from sagemaker import image_uris
  from sagemaker.amazon.kmeans import KMeans, KMeansPredictor
  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