code: def test_tuning_kmeans_efs(
      efs_fsx_setup, sagemaker_session, cpu_instance_type
  ):
      role = efs_fsx_setup["role_name"]
      subnets = [efs_fsx_setup["subnet_id"]]
      security_group_ids = efs_fsx_setup["security_group_ids"]
      kmeans = KMeans(
          role=role,
          instance_count=INSTANCE_COUNT,
          instance_type=cpu_instance_type,
          k=K,
          sagemaker_session=sagemaker_session,
          subnets=subnets,
          security_group_ids=security_group_ids,
      )
  
      hyperparameter_ranges = {
          "extra_center_factor": IntegerParameter(4, 10),
          "mini_batch_size": IntegerParameter(10, 100),
          "epochs": IntegerParameter(1, 2),
          "init_method": CategoricalParameter(["kmeans++", "random"]),
      }
  
      with timeout(minutes=TUNING_DEFAULT_TIMEOUT_MINUTES):
          tuner = HyperparameterTuner(
              estimator=kmeans,
              objective_metric_name=OBJECTIVE_METRIC_NAME,
              hyperparameter_ranges=hyperparameter_ranges,
              objective_type="Minimize",
              max_jobs=MAX_JOBS,
              max_parallel_jobs=MAX_PARALLEL_JOBS,
          )
  
          file_system_efs_id = efs_fsx_setup["file_system_efs_id"]
          train_records = FileSystemRecordSet(
              file_system_id=file_system_efs_id,
              file_system_type="EFS",
              directory_path=EFS_DIR_PATH,
              num_records=NUM_RECORDS,
              feature_dim=FEATURE_DIM,
          )
  
          test_records = FileSystemRecordSet(
              file_system_id=file_system_efs_id,
              file_system_type="EFS",
              directory_path=EFS_DIR_PATH,
              num_records=NUM_RECORDS,
              feature_dim=FEATURE_DIM,
              channel="test",
          )
  
          job_name = unique_name_from_base("tune-kmeans-efs")
          tuner.fit([train_records, test_records], job_name=job_name)
          tuner.wait()
          best_training_job = tuner.best_training_job()
          assert best_training_job
  
file_path: sagemaker-python-sdk/tests/integ/test_kmeans_efs_fsx.py
imports: from __future__ import absolute_import
  import pytest
  from sagemaker import KMeans
  from sagemaker.amazon.amazon_estimator import FileSystemRecordSet
  from sagemaker.parameter import IntegerParameter, CategoricalParameter
  from sagemaker.tuner import HyperparameterTuner
  from sagemaker.utils import unique_name_from_base
  import tests
  from tests.integ import TRAINING_DEFAULT_TIMEOUT_MINUTES, TUNING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.file_system_input_utils import set_up_efs_fsx, tear_down
  from tests.integ.s3_utils import assert_s3_files_exist
  from tests.integ.timeout import timeout
label_desc: Use image node_id 4 for calling a global function with example usage: test_tuning_kmeans_efs(efs_fsx_setup, sagemaker_session, cpu_instance_type) without return types