code: def _xgboost_estimator(
      sagemaker_session,
      framework_version,
      instance_type=None,
      instance_count=1,
      base_job_name=None,
      **kwargs,
  ):
      return XGBoost(
          entry_point=SCRIPT_PATH,
          framework_version=framework_version,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_type=instance_type
          if instance_type
          else INSTANCE_TYPE,
          instance_count=instance_count,
          base_job_name=base_job_name,
          py_version=PYTHON_VERSION,
          **kwargs,
      )
  
imports: from __future__ import absolute_import
  import logging
  import json
  import os
  import pytest
  from mock import Mock
  from mock import patch
  from packaging.version import Version
  from sagemaker.fw_utils import UploadedCode
  from sagemaker.session_settings import SessionSettings
  from sagemaker.xgboost import XGBoost, XGBoostModel, XGBoostPredictor
label_desc: Use image node_id 3 for calling a global function with example usage: _xgboost_estimator(sagemaker_session, framework_version, instance_type, instance_count, base_job_name) and returns: XGBoost