code: def iris_image(sagemaker_session):
      algorithm_name = unique_name_from_base("iris-classifier")
      ecr_image = _ecr_image_uri(sagemaker_session, algorithm_name)
      ecr_client = sagemaker_session.boto_session.client("ecr")
      username, password = _ecr_login(ecr_client)
  
      docker_client = docker.from_env()
  
      # Build and tag docker image locally
      path = os.path.join(DATA_DIR, "marketplace", "iris")
      image, build_logs = docker_client.images.build(
          path=path,
          tag=algorithm_name,
          rm=True,
      )
      image.tag(ecr_image, tag="latest")
      create_repository(ecr_client, algorithm_name)
  
      # Retry docker image push
      for _ in retries(
          3, "Upload docker image to ECR repo", seconds_to_sleep=10
      ):
          try:
              docker_client.images.push(
                  ecr_image,
                  auth_config={
                      "username": username,
                      "password": password,
                  },
              )
              break
          except requests.exceptions.ConnectionError:
              # This can happen when we try to create multiple repositories in parallel, so we retry
              pass
  
      yield ecr_image
  
      # Delete repository after the marketplace integration tests complete
      _delete_repository(ecr_client, algorithm_name)
  
imports: from __future__ import absolute_import
  import itertools
  import os
  import time
  import requests
  import pandas
  import pytest
  import docker
  import sagemaker
  import tests.integ
  from tests.integ.utils import create_repository
  from sagemaker import AlgorithmEstimator, ModelPackage, Model
  from sagemaker.serializers import CSVSerializer
  from sagemaker.tuner import IntegerParameter, HyperparameterTuner
  from sagemaker.utils import sagemaker_timestamp, _aws_partition, unique_name_from_base
  from tests.integ import DATA_DIR
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
  from tests.integ.marketplace_utils import REGION_ACCOUNT_MAP
  from tests.integ.test_multidatamodel import _ecr_image_uri, _ecr_login, _delete_repository
  from tests.integ.retry import retries
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: iris_image(sagemaker_session) without return types