code: def test_xgboost_serverless_inference(
      xgboost_training_job,
      sagemaker_session,
      xgboost_latest_version,
  ):
      endpoint_name = unique_name_from_base(
          "test-xgboost-deploy-model-serverless"
      )
      with timeout_and_delete_endpoint_by_name(
          endpoint_name, sagemaker_session
      ):
          desc = (
              sagemaker_session.sagemaker_client.describe_training_job(
                  TrainingJobName=xgboost_training_job
              )
          )
          model_data = desc["ModelArtifacts"]["S3ModelArtifacts"]
  
          xgboost = XGBoostModel(
              sagemaker_session=sagemaker_session,
              model_data=model_data,
              role=ROLE,
              entry_point=os.path.join(
                  DATA_DIR, "xgboost_abalone", "abalone.py"
              ),
              framework_version=xgboost_latest_version,
          )
  
          xgboost.deploy(
              serverless_inference_config=ServerlessInferenceConfig(),
              endpoint_name=endpoint_name,
          )
  
file_path: sagemaker-python-sdk/tests/integ/test_xgboost.py
imports: from __future__ import absolute_import
  import os
  import pytest
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.utils import unique_name_from_base
  from sagemaker.xgboost import XGBoost, XGBoostModel
  from sagemaker.xgboost.processing import XGBoostProcessor
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 5 for calling a global function with example usage: test_xgboost_serverless_inference(xgboost_training_job, sagemaker_session, xgboost_latest_version) without return types