def group_images_by_content_advisory(images):
    """
    Returns dict with content advisory name as a key and list of images
    containing some RPM from that content_advisory as value.
    """
    ret = {}
    for image in images:
        for advisory in image["repositories"][0]["content_advisory_ids"]:
            if not advisory.startswith("RHSA"):
                continue
            if advisory not in ret:
                ret[advisory] = []
            ret[advisory].append(image["brew"]["build"])
    return ret