def content_addressable_imgref(image_repository, image_id):
    """
    Creates a content-addressable image reference for an image with a given
    image ID to store in a given image repository: the resulting image
    reference will uniquely address the content of the image.

    Args:
        image_repository: The repository to use in the image reference.
        image_id: The ID of the image.
    """
    return image_repository + ':' + image_id[image_id.index(':') + 1:][:40]