code: def test_huggingface_inference(
      sagemaker_session,
      gpu_pytorch_instance_type,
      huggingface_inference_latest_version,
      huggingface_inference_pytorch_latest_version,
      huggingface_pytorch_latest_inference_py_version,
  ):
      env = {
          "HF_MODEL_ID": "philschmid/tiny-distilbert-classification",
          "HF_TASK": "text-classification",
      }
      endpoint_name = unique_name_from_base("test-hf-inference")
  
      model = HuggingFaceModel(
          sagemaker_session=sagemaker_session,
          role="SageMakerRole",
          env=env,
          py_version=huggingface_pytorch_latest_inference_py_version,
          transformers_version=huggingface_inference_latest_version,
          pytorch_version=huggingface_inference_pytorch_latest_version,
      )
      with timeout_and_delete_endpoint_by_name(
          endpoint_name, sagemaker_session
      ):
          model.deploy(
              instance_type=gpu_pytorch_instance_type,
              initial_instance_count=1,
              endpoint_name=endpoint_name,
          )
  
          predictor = HuggingFacePredictor(endpoint_name=endpoint_name)
          data = {
              "inputs": "Camera - You are awarded a SiPix Digital Camera!"
              "call 09061221066 fromm landline. Delivery within 28 days."
          }
          output = predictor.predict(data)
          assert "score" in output[0]
  
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 4 for calling a global function with example usage: test_huggingface_inference(sagemaker_session, gpu_pytorch_instance_type, huggingface_inference_latest_version, huggingface_inference_pytorch_latest_version, huggingface_pytorch_latest_inference_py_version) without return types