code: def test_create_endpoint_config(sagemaker_session):
      returned_name = sagemaker_session.create_endpoint_config(
          name=ENDPOINT_CONFIG_NAME,
          model_name=MODEL_NAME,
          initial_instance_count=INITIAL_INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
      )
  
      assert returned_name == ENDPOINT_CONFIG_NAME
      expected_pvs = [
          {
              "ModelName": MODEL_NAME,
              "InitialInstanceCount": INITIAL_INSTANCE_COUNT,
              "InstanceType": INSTANCE_TYPE,
              "InitialVariantWeight": 1,
              "VariantName": "AllTraffic",
          }
      ]
      sagemaker_session.sagemaker_client.create_endpoint_config.assert_called_once_with(
          EndpointConfigName=ENDPOINT_CONFIG_NAME,
          ProductionVariants=expected_pvs,
          Tags=[],
      )
  
file_path: sagemaker-python-sdk/tests/unit/test_create_deploy_entities.py
imports: from __future__ import absolute_import
  import pytest
  from mock import MagicMock, Mock
  import sagemaker
label_desc: Use image node_id 4 for calling a global function with example usage: test_create_endpoint_config(sagemaker_session) without return types