code: def test_all_defaults_no_existing_entities(sagemaker_session):
      original_args = {
          "job_name": JOB_NAME,
          "initial_instance_count": INITIAL_INSTANCE_COUNT,
          "instance_type": INSTANCE_TYPE,
          "wait": False,
      }
  
      returned_name = sagemaker_session.endpoint_from_job(
          **original_args
      )
  
      expected_args = original_args.copy()
      expected_args.pop("job_name")
      expected_args["model_s3_location"] = S3_MODEL_SRC_COMPRESSED
      expected_args["image_uri"] = IMAGE
      expected_args["role"] = TRAIN_ROLE
      expected_args["name"] = JOB_NAME
      expected_args["model_environment_vars"] = None
      expected_args["model_vpc_config"] = VPC_CONFIG
      expected_args["accelerator_type"] = None
      expected_args["data_capture_config"] = None
      sagemaker_session.endpoint_from_model_data.assert_called_once_with(
          **expected_args
      )
      assert returned_name == ENDPOINT_FROM_MODEL_RETURNED_NAME
  
imports: from __future__ import absolute_import
  import pytest
  from mock import MagicMock, Mock
  import sagemaker
label_desc: Use image node_id 2 for calling a global function with example usage: test_all_defaults_no_existing_entities(sagemaker_session) without return types