code: def test_retrieve_pipeline_trigger_artifact_when_artifact_does_not_exist():
      with patch.object(
          Artifact, "list", return_value=[]
      ) as artifact_list_method:
          with patch.object(
              Artifact, "load", return_value=PIPELINE_TRIGGER_ARTIFACT
          ) as artifact_load_method:
              with patch.object(
                  Artifact,
                  "create",
                  return_value=PIPELINE_TRIGGER_ARTIFACT,
              ) as artifact_create_method:
                  result = S3LineageEntityHandler.retrieve_pipeline_trigger_artifact(
                      pipeline_trigger=PIPELINE_TRIGGER,
                      sagemaker_session=SAGEMAKER_SESSION_MOCK,
                  )
  
      assert result == PIPELINE_TRIGGER_ARTIFACT
  
      artifact_list_method.assert_called_once_with(
          source_uri=PIPELINE_TRIGGER.trigger_arn,
          sagemaker_session=SAGEMAKER_SESSION_MOCK,
      )
  
      artifact_load_method.assert_not_called()
  
      artifact_create_method.assert_called_once_with(
          source_uri=PIPELINE_TRIGGER.trigger_arn,
          artifact_type="PipelineTrigger",
          artifact_name=f"sm-fs-fe-trigger-{PIPELINE_TRIGGER.trigger_name}",
          properties=dict(
              pipeline_name=PIPELINE_TRIGGER.pipeline_name,
              event_pattern=PIPELINE_TRIGGER.event_pattern,
              state=PIPELINE_TRIGGER.state,
          ),
          source_types=None,
          sagemaker_session=SAGEMAKER_SESSION_MOCK,
      )
  
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 11 for calling a global function with example usage: test_retrieve_pipeline_trigger_artifact_when_artifact_does_not_exist() without return types