def METHOD_NAME(tagged_image, source_registry, target_registry, dry_run=DRY_RUN):
    if not tagged_image.startswith(source_registry):
        raise ValueError(f"Re-tagging {tagged_image} - image must be in the '{source_registry}' registry")
    retagged_image = re.sub(rf'^{source_registry}', target_registry, tagged_image)
    log.info(f'gcloud container images add-tag {REGISTRY_ROOT}/{tagged_image} {REGISTRY_ROOT}/{retagged_image}')
    if not dry_run:
        subprocess.run([
            'gcloud',
            'container',
            'images',
            'add-tag',
            f'{REGISTRY_ROOT}/{tagged_image}',
            f'{REGISTRY_ROOT}/{retagged_image}',
            '--quiet'
        ]).check_returncode()