code: def test_deploy_update_endpoint(tfo, time, sagemaker_session):
      framework_model = DummyFrameworkModel(sagemaker_session)
      endpoint_name = "endpoint-name"
      sparkml_model = SparkMLModel(
          model_data=MODEL_DATA_2,
          role=ROLE,
          sagemaker_session=sagemaker_session,
      )
      model = PipelineModel(
          models=[framework_model, sparkml_model],
          role=ROLE,
          sagemaker_session=sagemaker_session,
      )
      model.deploy(
          instance_type=INSTANCE_TYPE,
          initial_instance_count=1,
          endpoint_name=endpoint_name,
          update_endpoint=True,
      )
  
      sagemaker_session.create_endpoint_config.assert_called_with(
          name=model.name,
          model_name=model.name,
          initial_instance_count=INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
          tags=None,
          kms_key=None,
          data_capture_config_dict=None,
          volume_size=None,
          model_data_download_timeout=None,
          container_startup_health_check_timeout=None,
      )
      config_name = sagemaker_session.create_endpoint_config(
          name=model.name,
          model_name=model.name,
          initial_instance_count=INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
      )
      sagemaker_session.update_endpoint.assert_called_with(
          endpoint_name, config_name, wait=True
      )
      sagemaker_session.create_endpoint.assert_not_called()
  
imports: from __future__ import absolute_import
  import copy
  import pytest
  from botocore.utils import merge_dicts
  from mock import Mock, patch
  from mock.mock import ANY
  from sagemaker.model import FrameworkModel
  from sagemaker.pipeline import PipelineModel
  from sagemaker.predictor import Predictor
  from sagemaker.session_settings import SessionSettings
  from sagemaker.sparkml import SparkMLModel
  from tests.unit import SAGEMAKER_CONFIG_MODEL, SAGEMAKER_CONFIG_ENDPOINT_CONFIG
label_desc: Use image node_id 5 for calling a global function with example usage: test_deploy_update_endpoint(tfo, time, sagemaker_session) without return types