<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def registry(region_name, framework=None):
 """ Return docker registry for the given AWS region for the given framework. This is only used for SparkML and Scikit-learn for now. """

    try:
        account_id = image_registry_map[region_name][framework]
        return get_ecr_image_uri_prefix(account_id, region_name)
    except KeyError:
        logging.error("The specific image or region does not exist")
        raise