def METHOD_NAME(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