code: def static_model_artifact(
      sagemaker_session, static_pipeline_execution_arn
  ):
      model_package_arn = get_model_package_arn_from_static_pipeline(
          static_pipeline_execution_arn, sagemaker_session
      )
  
      artifacts = sagemaker_session.sagemaker_client.list_artifacts(
          SourceUri=model_package_arn
      )["ArtifactSummaries"]
  
      logging.info(
          f"Found {len(artifacts)} artifacts associated with {model_package_arn}"
      )
      for art in artifacts:
          logging.info(f'Found artifact {art["ArtifactArn"]}')
  
      if len(artifacts) == 0:
          raise (
              Exception(
                  f"Got an unexpected number of Artifacts for \
                      model package {model_package_arn}. Expected 1 but got {len(artifacts)}"
              )
          )
  
      artifact_arn = artifacts[0]["ArtifactArn"]
      logging.info(f"Using static model artifact {artifact_arn}")
  
      yield artifact.ModelArtifact.load(
          artifact_arn, sagemaker_session=sagemaker_session
      )
  
imports: from __future__ import absolute_import
  import time
  import boto3
  import pytest
  import logging
  import uuid
  import json
  from sagemaker.lineage import action, context, association, artifact
  from sagemaker.model import ModelPackage
  from sagemaker.utils import retry_with_backoff
  from tests.integ.sagemaker.workflow.test_workflow import test_end_to_end_pipeline_successful_execution
  from sagemaker.workflow.pipeline import _PipelineExecution
  from sagemaker.session import get_execution_role
  from smexperiments import trial_component, trial, experiment
  from random import randint
  from botocore.exceptions import ClientError
  from sagemaker.lineage.query import LineageQuery, LineageFilter, LineageSourceEnum, LineageEntityEnum, LineageQueryDirectionEnum
  from sagemaker.lineage.lineage_trial_component import LineageTrialComponent
  from tests.integ.sagemaker.lineage.helpers import name, names
label_desc: Use image node_id 35 for calling a global function with example usage: static_model_artifact(sagemaker_session, static_pipeline_execution_arn) without return types