code: def test_retrieve_ecr_hostname(config_for_framework):
      registries = {
          "cn-north-1": "000000010010",
          "cn-northwest-1": "010000001000",
          "us-iso-east-1": "000111111000",
          "us-isob-east-1": "000111111000",
      }
  
      config = copy.deepcopy(BASE_CONFIG)
      config["versions"]["1.0.0"]["registries"] = registries
      config_for_framework.return_value = config
  
      uri = image_uris.retrieve(
          framework="useless-string",
          version="1.0.0",
          py_version="py3",
          instance_type="ml.c4.xlarge",
          region="cn-north-1",
          image_scope="training",
      )
      assert (
          "000000010010.dkr.ecr.cn-north-1.amazonaws.com.cn/dummy:1.0.0-cpu-py3"
          == uri
      )
  
      uri = image_uris.retrieve(
          framework="useless-string",
          version="1.0.0",
          py_version="py3",
          instance_type="ml.c4.xlarge",
          region="cn-northwest-1",
          image_scope="training",
      )
      assert (
          "010000001000.dkr.ecr.cn-northwest-1.amazonaws.com.cn/dummy:1.0.0-cpu-py3"
          == uri
      )
  
      uri = image_uris.retrieve(
          framework="useless-string",
          version="1.0.0",
          py_version="py3",
          instance_type="ml.c4.xlarge",
          region="us-iso-east-1",
          image_scope="training",
      )
      assert (
          "000111111000.dkr.ecr.us-iso-east-1.c2s.ic.gov/dummy:1.0.0-cpu-py3"
          == uri
      )
  
      uri = image_uris.retrieve(
          framework="useless-string",
          version="1.0.0",
          py_version="py3",
          instance_type="ml.c4.xlarge",
          region="us-isob-east-1",
          image_scope="training",
      )
      assert (
          "000111111000.dkr.ecr.us-isob-east-1.sc2s.sgov.gov/dummy:1.0.0-cpu-py3"
          == uri
      )
  
imports: from __future__ import absolute_import
  import copy
  import logging
  import pytest
  from mock import patch
  from sagemaker import image_uris
  from sagemaker.workflow.functions import Join
  from sagemaker.workflow.parameters import ParameterString
label_desc: Use image node_id 10 for calling a global function with example usage: test_retrieve_ecr_hostname(config_for_framework) without return types