code: def create_repository(ecr_client, repository_name):
      """Creates an ECS Repository (ECR).
  
      When a new transform is being registered,
      we'll need a repository to push the image (and composed model images) to
      """
      try:
          response = ecr_client.create_repository(
              repositoryName=repository_name
          )
          return response["repository"]["repositoryUri"]
      except ClientError as e:
          # Handle when the repository already exists
          if "RepositoryAlreadyExistsException" == e.response.get(
              "Error", {}
          ).get("Code"):
              response = ecr_client.describe_repositories(
                  repositoryNames=[repository_name]
              )
              return response["repositories"][0]["repositoryUri"]
          else:
              raise
  
file_path: sagemaker-python-sdk/tests/integ/utils.py
imports: from __future__ import absolute_import
  import logging
  import shutil
  from functools import wraps
  from botocore.exceptions import ClientError
  from tests.conftest import NO_P3_REGIONS, NO_M4_REGIONS
  from sagemaker.exceptions import CapacityError
  from sagemaker.session import Session
label_desc: Use image node_id 4 for calling a global function with example usage: create_repository(ecr_client, repository_name) and returns: response, response