code: def test_no_defaults_no_existing_entities(
      name_from_image_mock, sagemaker_session
  ):
      container_def_with_env = CONTAINER_DEF.copy()
      container_def_with_env.update({"Environment": ENV_VARS})
  
      returned_name = sagemaker_session.endpoint_from_model_data(
          model_s3_location=S3_MODEL_ARTIFACTS,
          image_uri=DEPLOY_IMAGE,
          initial_instance_count=INITIAL_INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
          role=DEPLOY_ROLE,
          wait=False,
          name=ENDPOINT_NAME,
          model_environment_vars=ENV_VARS,
          model_vpc_config=VPC_CONFIG,
          accelerator_type=ACCELERATOR_TYPE,
      )
      sagemaker_session.create_model.assert_called_once_with(
          name=ENDPOINT_NAME,
          role=DEPLOY_ROLE,
          container_defs=container_def_with_env,
          vpc_config=VPC_CONFIG,
      )
      sagemaker_session.create_endpoint_config.assert_called_once_with(
          name=ENDPOINT_NAME,
          model_name=ENDPOINT_NAME,
          initial_instance_count=INITIAL_INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
          accelerator_type=ACCELERATOR_TYPE,
          data_capture_config_dict=None,
          tags=None,
      )
      sagemaker_session.create_endpoint.assert_called_once_with(
          endpoint_name=ENDPOINT_NAME,
          config_name=ENDPOINT_NAME,
          wait=False,
          tags=None,
      )
      assert returned_name == ENDPOINT_NAME
  
file_path: sagemaker-python-sdk/tests/unit/test_endpoint_from_model_data.py
imports: from __future__ import absolute_import
  import pytest
  from botocore.exceptions import ClientError
  from mock import MagicMock, Mock
  from mock import patch
  from .common import _raise_unexpected_client_error, _raise_does_already_exists_client_error, _raise_does_not_exist_client_error
  import sagemaker
label_desc: Use image node_id 3 for calling a global function with example usage: test_no_defaults_no_existing_entities(name_from_image_mock, sagemaker_session) without return types