code: def test_create_model_from_estimator(
      name_from_base, sagemaker_session, xgboost_framework_version
  ):
      container_log_level = '"logging.INFO"'
      source_dir = "s3://mybucket/source"
      base_job_name = "job"
  
      xgboost = XGBoost(
          entry_point=SCRIPT_PATH,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_type=INSTANCE_TYPE,
          instance_count=1,
          framework_version=xgboost_framework_version,
          container_log_level=container_log_level,
          py_version=PYTHON_VERSION,
          base_job_name=base_job_name,
          source_dir=source_dir,
      )
  
      xgboost.fit(inputs="s3://mybucket/train", job_name="new_name")
  
      model_name = "model_name"
      name_from_base.return_value = model_name
      model = xgboost.create_model()
  
      assert model.sagemaker_session == sagemaker_session
      assert model.framework_version == xgboost_framework_version
      assert model.py_version == xgboost.py_version
      assert model.entry_point == SCRIPT_PATH
      assert model.role == ROLE
      assert model.name == model_name
      assert model.container_log_level == container_log_level
      assert model.source_dir == source_dir
      assert model.vpc_config is None
  
      name_from_base.assert_called_with(base_job_name)
  
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 7 for calling a global function with example usage: test_create_model_from_estimator(name_from_base, sagemaker_session, xgboost_framework_version) without return types