code: def test_huggingface(
      time,
      name_from_base,
      sagemaker_session,
      huggingface_training_version,
      huggingface_pytorch_training_version,
      huggingface_pytorch_training_py_version,
  ):
      hf = HuggingFace(
          py_version=huggingface_pytorch_training_py_version,
          entry_point=SCRIPT_PATH,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_count=INSTANCE_COUNT,
          instance_type=GPU_INSTANCE_TYPE,
          transformers_version=huggingface_training_version,
          pytorch_version=huggingface_pytorch_training_version,
          enable_sagemaker_metrics=False,
      )
  
      inputs = "s3://mybucket/train"
  
      hf.fit(inputs=inputs, experiment_config=EXPERIMENT_CONFIG)
  
      sagemaker_call_names = [
          c[0] for c in sagemaker_session.method_calls
      ]
      assert sagemaker_call_names == ["train", "logs_for_job"]
      boto_call_names = [
          c[0] for c in sagemaker_session.boto_session.method_calls
      ]
      assert boto_call_names == ["resource"]
  
      expected_train_args = _create_train_job(
          huggingface_training_version,
          f"pytorch{huggingface_pytorch_training_version}",
      )
      expected_train_args["input_config"][0]["DataSource"][
          "S3DataSource"
      ]["S3Uri"] = inputs
      expected_train_args["experiment_config"] = EXPERIMENT_CONFIG
      expected_train_args["enable_sagemaker_metrics"] = False
  
      actual_train_args = sagemaker_session.method_calls[0][2]
      assert actual_train_args == expected_train_args
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/huggingface/test_estimator.py
imports: from __future__ import absolute_import
  import logging
  import json
  import os
  import pytest
  from mock import MagicMock, Mock, patch
  from sagemaker.huggingface import HuggingFace, HuggingFaceModel
  from sagemaker.session_settings import SessionSettings
  from .huggingface_utils import get_full_gpu_image_uri, GPU_INSTANCE_TYPE, REGION
label_desc: Use image node_id 5 for calling a global function with example usage: test_huggingface(time, name_from_base, sagemaker_session, huggingface_training_version, huggingface_pytorch_training_version, huggingface_pytorch_training_py_version) without return types