code: def test_huggingface_training(
      sagemaker_session,
      huggingface_training_latest_version,
      huggingface_training_pytorch_latest_version,
      huggingface_pytorch_latest_training_py_version,
      gpu_pytorch_instance_type,
  ):
      with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
          data_path = os.path.join(DATA_DIR, "huggingface")
  
          hf = HuggingFace(
              py_version=huggingface_pytorch_latest_training_py_version,
              source_dir=data_path,
              entry_point="run_glue.py",
              role="SageMakerRole",
              transformers_version=huggingface_training_latest_version,
              pytorch_version=huggingface_training_pytorch_latest_version,
              instance_count=1,
              instance_type=gpu_pytorch_instance_type,
              hyperparameters={
                  "model_name_or_path": "distilbert-base-cased",
                  "task_name": "wnli",
                  "do_train": True,
                  "do_eval": True,
                  "max_seq_length": 128,
                  "fp16": True,
                  "per_device_train_batch_size": 128,
                  "output_dir": "/opt/ml/model",
              },
              sagemaker_session=sagemaker_session,
              disable_profiler=True,
          )
  
          train_input = hf.sagemaker_session.upload_data(
              path=os.path.join(data_path, "train"),
              key_prefix="integ-test-data/huggingface/train",
          )
  
          hf.fit(train_input)
  
file_path: sagemaker-python-sdk/tests/integ/test_huggingface.py
imports: from __future__ import absolute_import
  import os
  import pytest
  import tests.integ
  from sagemaker.huggingface import HuggingFace, HuggingFaceProcessor
  from sagemaker.huggingface.model import HuggingFaceModel, HuggingFacePredictor
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
  from sagemaker.enums import EndpointType
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 2 for calling a global function with example usage: test_huggingface_training(sagemaker_session, huggingface_training_latest_version, huggingface_training_pytorch_latest_version, huggingface_pytorch_latest_training_py_version, gpu_pytorch_instance_type) without return types