code: def test_dlc_framework_uris(load_config_and_file_name, scope):
      config, file_name = load_config_and_file_name
      framework = file_name.split(".json")[0]
      VERSIONS = config[scope]["versions"]
  
      for version in VERSIONS:
          if not config[scope]["versions"][version].get("registries"):
              continue
          ACCOUNTS = config[scope]["versions"][version]["registries"]
          repo = config[scope]["versions"][version]["repository"]
          py_versions = config[scope]["versions"][version].get(
              "py_versions", [None]
          )
          processors = config[scope].get("processors", ["cpu", "gpu"])
  
          for processor in processors:
              instance_type = COMMON_INSTANCE_TYPES[processor]
              if (
                  framework == "pytorch"
                  and Version(version) >= Version("1.13")
              ) or (
                  framework == "tensorflow"
                  and Version(version) >= Version("2.12")
              ):
                  instance_type = RENEWED_INSTANCE_TYPES[processor]
              for py_version in py_versions:
                  for region in ACCOUNTS.keys():
                      if scope == "eia":
                          uri = image_uris.retrieve(
                              framework,
                              region=region,
                              version=version,
                              py_version=py_version,
                              image_scope="inference",
                              instance_type=instance_type,
                              accelerator_type="ml.eia1.medium",
                          )
                      else:
                          uri = image_uris.retrieve(
                              framework,
                              region=region,
                              version=version,
                              py_version=py_version,
                              image_scope=scope,
                              instance_type=instance_type,
                          )
                      expected = expected_uris.framework_uri(
                          repo=repo,
                          fw_version=version,
                          py_version=py_version,
                          processor=processor,
                          region=region,
                          account=ACCOUNTS[region],
                      )
                      assert uri == expected
  
imports: from __future__ import absolute_import
  from packaging.version import Version
  from sagemaker import image_uris
  from tests.unit.sagemaker.image_uris import expected_uris
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_dlc_framework_uris(load_config_and_file_name, scope) without return types