code: def test_training_with_network_isolation(
      sagemaker_session,
      xgboost_latest_version,
      xgboost_latest_py_version,
      cpu_instance_type,
  ):
      with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
          base_job_name = "test-network-isolation-xgboost"
  
          xgboost = XGBoost(
              entry_point=os.path.join(
                  DATA_DIR, "xgboost_abalone", "abalone.py"
              ),
              role=ROLE,
              instance_type=cpu_instance_type,
              instance_count=1,
              framework_version=xgboost_latest_version,
              py_version=xgboost_latest_py_version,
              base_job_name=base_job_name,
              sagemaker_session=sagemaker_session,
              enable_network_isolation=True,
          )
  
          train_input = xgboost.sagemaker_session.upload_data(
              path=os.path.join(DATA_DIR, "xgboost_abalone", "abalone"),
              key_prefix="integ-test-data/xgboost_abalone/abalone",
          )
          job_name = unique_name_from_base(base_job_name)
          xgboost.fit(inputs={"train": train_input}, job_name=job_name)
          assert (
              sagemaker_session.sagemaker_client.describe_training_job(
                  TrainingJobName=job_name
              )["EnableNetworkIsolation"]
          )
  
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 4 for calling a global function with example usage: test_training_with_network_isolation(sagemaker_session, xgboost_latest_version, xgboost_latest_py_version, cpu_instance_type) without return types