from typing import MutableMapping


def find_images(values, images=None):
    """
    Searches through values.yaml for images and their tags and returns a list of
    "<image>:<tag>" strings.
    """
    if images == None:
        images = []

    for k, v in values.items():
        if isinstance(v, MutableMapping):
            if k == "image":
                if "name" in v and "tag" in v:
                    images.append(f"{v['name']}:{v['tag']}")
            else:
                find_images(v, images)
    return sorted(images)