code: def test_retrieve_pipeline_schedule_artifact_when_artifact_updated():
      schedule_artifact_result = copy.deepcopy(SCHEDULE_ARTIFACT_RESULT)
      with patch.object(
          Artifact, "list", return_value=[ARTIFACT_SUMMARY]
      ) as artifact_list_method:
          with patch.object(
              Artifact, "load", return_value=schedule_artifact_result
          ) as artifact_load_method:
              with patch.object(
                  schedule_artifact_result, "save"
              ) as artifact_save_method:
                  with patch.object(
                      Artifact,
                      "create",
                      return_value=schedule_artifact_result,
                  ) as artifact_create_method:
                      result = S3LineageEntityHandler.retrieve_pipeline_schedule_artifact(
                          pipeline_schedule=PIPELINE_SCHEDULE_2,
                          sagemaker_session=SAGEMAKER_SESSION_MOCK,
                      )
  
      assert result == schedule_artifact_result
      assert schedule_artifact_result != SCHEDULE_ARTIFACT_RESULT
      assert (
          result.properties["pipeline_name"]
          == PIPELINE_SCHEDULE_2.pipeline_name
      )
      assert (
          result.properties["schedule_expression"]
          == PIPELINE_SCHEDULE_2.schedule_expression
      )
      assert result.properties["state"] == PIPELINE_SCHEDULE_2.state
      assert (
          result.properties["start_date"]
          == PIPELINE_SCHEDULE_2.start_date
      )
  
      artifact_list_method.assert_called_once_with(
          source_uri=PIPELINE_SCHEDULE.schedule_arn,
          sagemaker_session=SAGEMAKER_SESSION_MOCK,
      )
  
      artifact_load_method.assert_called_once_with(
          artifact_arn=ARTIFACT_SUMMARY.artifact_arn,
          sagemaker_session=SAGEMAKER_SESSION_MOCK,
      )
  
      artifact_save_method.assert_called_once_with()
  
      artifact_create_method.assert_not_called()
  
imports: from __future__ import absolute_import
  import copy
  from mock import patch
  from test_constants import ARTIFACT_RESULT, ARTIFACT_SUMMARY, PIPELINE_SCHEDULE, PIPELINE_SCHEDULE_2, PIPELINE_TRIGGER, PIPELINE_TRIGGER_2, PIPELINE_TRIGGER_ARTIFACT, PIPELINE_TRIGGER_ARTIFACT_SUMMARY, SCHEDULE_ARTIFACT_RESULT, TRANSFORMATION_CODE_ARTIFACT_1, TRANSFORMATION_CODE_INPUT_1, LAST_UPDATE_TIME, MockDataSource
  from test_pipeline_lineage_entity_handler import SAGEMAKER_SESSION_MOCK
  from sagemaker.feature_store.feature_processor import CSVDataSource
  from sagemaker.feature_store.feature_processor.lineage._s3_lineage_entity_handler import S3LineageEntityHandler
  from sagemaker.feature_store.feature_processor.lineage._transformation_code import TransformationCode
  from sagemaker.lineage.artifact import Artifact
label_desc: Use image node_id 10 for calling a global function with example usage: test_retrieve_pipeline_schedule_artifact_when_artifact_updated() without return types