code: def test_all_hyperparameters_classifier(sagemaker_session):
      test_params = ALL_REQ_ARGS.copy()
      test_params["predictor_type"] = PREDICTOR_TYPE_CLASSIFIER
  
      knn = KNN(
          sagemaker_session=sagemaker_session,
          dimension_reduction_type="fjlt",
          dimension_reduction_target="2",
          index_type="faiss.IVFFlat",
          index_metric="L2",
          faiss_index_ivf_nlists="20",
          **test_params,
      )
      assert knn.hyperparameters() == dict(
          k=str(ALL_REQ_ARGS["k"]),
          sample_size=str(ALL_REQ_ARGS["sample_size"]),
          predictor_type=str(PREDICTOR_TYPE_CLASSIFIER),
          dimension_reduction_type="fjlt",
          dimension_reduction_target="2",
          index_type="faiss.IVFFlat",
          index_metric="L2",
          faiss_index_ivf_nlists="20",
      )
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, patch
  from sagemaker import image_uris
  from sagemaker.amazon.knn import KNN, KNNPredictor
  from sagemaker.amazon.amazon_estimator import RecordSet
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 5 for calling a global function with example usage: test_all_hyperparameters_classifier(sagemaker_session) without return types