code: def test_init_required_positional(sagemaker_session):
      knn = KNN(
          ROLE,
          INSTANCE_COUNT,
          INSTANCE_TYPE,
          K,
          SAMPLE_SIZE,
          PREDICTOR_TYPE_REGRESSOR,
          sagemaker_session=sagemaker_session,
      )
      assert knn.role == ROLE
      assert knn.instance_count == INSTANCE_COUNT
      assert knn.instance_type == INSTANCE_TYPE
      assert knn.k == K
  
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 2 for calling a global function with example usage: test_init_required_positional(sagemaker_session) without return types