code: def _huggingface_estimator(
      sagemaker_session,
      framework_version,
      pytorch_version,
      tensorflow_version,
      py_version,
      instance_type=None,
      base_job_name=None,
      **kwargs,
  ):
      return HuggingFace(
          entry_point=SCRIPT_PATH,
          framework_version=framework_version,
          py_version=py_version,
          pytorch_version=pytorch_version,
          tensorflow_version=tensorflow_version,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_count=INSTANCE_COUNT,
          instance_type=instance_type
          if instance_type
          else GPU_INSTANCE_TYPE,
          base_job_name=base_job_name,
          **kwargs,
      )
  
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 2 for calling a global function with example usage: _huggingface_estimator(sagemaker_session, framework_version, pytorch_version, tensorflow_version, py_version, instance_type, base_job_name) and returns: HuggingFace