def look_for_updates(itemname, cataloglist):
    "Looks for updates for a given manifest item that is either\n    installed or scheduled to be installed or removed. This handles not only\n    specific application updates, but also updates that aren't simply\n    later versions of the manifest item.\n    For example, AdobeCameraRaw is an update for Adobe Photoshop, but\n    doesn't update the version of Adobe Photoshop.\n    Returns a list of manifestitem names that are updates for\n    manifestitem.\n    "
    display.display_debug1('Looking for updates for: %s', itemname)
    update_list = []
    for catalogname in cataloglist:
        if (catalogname not in _CATALOG):
            continue
        updaters = _CATALOG[catalogname]['updaters']
        update_items = [catalogitem['name'] for catalogitem in updaters if (itemname in catalogitem.get('update_for', []))]
        if update_items:
            update_list.extend(update_items)
    update_list = list(set(update_list))
    if update_list:
        num_updates = len(update_list)
        update_list_display = ', '.join((str(x) for x in update_list))
        display.display_debug1('Found %s update(s): %s', num_updates, update_list_display)
    return update_list
Looks for updates for a given manifest item that is either
installed or scheduled to be installed or removed. This handles not only
specific application updates, but also updates that aren't simply
later versions of the manifest item.
For example, AdobeCameraRaw is an update for Adobe Photoshop, but
doesn't update the version of Adobe Photoshop.
Returns a list of manifestitem names that are updates for
manifestitem.
def look_for_updates(itemname, cataloglist):
    "Looks for updates for a given manifest item that is either\n    installed or scheduled to be installed or removed. This handles not only\n    specific application updates, but also updates that aren't simply\n    later versions of the manifest item.\n    For example, AdobeCameraRaw is an update for Adobe Photoshop, but\n    doesn't update the version of Adobe Photoshop.\n    Returns a list of manifestitem names that are updates for\n    manifestitem.\n    "
    display.display_debug1('Looking for updates for: %s', itemname)
    update_list = []
    for catalogname in cataloglist:
        if (catalogname not in _CATALOG):
            continue
        updaters = _CATALOG[catalogname]['updaters']
        update_items = [catalogitem['name'] for catalogitem in updaters if (itemname in catalogitem.get('update_for', []))]
        if update_items:
            update_list.extend(update_items)
    update_list = list(set(update_list))
    if update_list:
        num_updates = len(update_list)
        update_list_display = ', '.join((str(x) for x in update_list))
        display.display_debug1('Found %s update(s): %s', num_updates, update_list_display)
    return update_list