code: def test_ecr_init(uri, account_id, region, repo_name, expected_uri):
      """This tests how we initialize the ElasticContainerRegistry.
  
      It basically just checks that we alway set the arguments correctly.
      """
      if expected_uri is None:
          with pytest.raises(LaunchError):
              ecr = ElasticContainerRegistry(
                  uri, account_id, region, repo_name
              )
      else:
          ecr = ElasticContainerRegistry(
              uri, account_id, region, repo_name
          )
          assert ecr.uri == expected_uri
          assert ecr.account_id == "123456789012"
          assert ecr.region == "us-east-1"
          assert ecr.repo_name == "my-repo"
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_registry/test_ecr.py
imports: from unittest.mock import MagicMock
  import botocore.exceptions
  import pytest
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.registry.elastic_container_registry import ElasticContainerRegistry
label_desc: Use image node_id 1 for calling a global function with example usage: test_ecr_init(uri, account_id, region, repo_name, expected_uri) without return types