def isItemInInstallInfo(manifestitem_pl, thelist, vers=''):
    for item in thelist:
        try:
            if item['name'] == manifestitem_pl['name']:
                if not vers:
                    return True
                #if the version already installed or processed to be
                #installed is the same or greater, then we're good.
                if item.get('installed') and (compareVersions(
                        item.get('installed_version'), vers) in (1, 2)):
                    return True
                if (compareVersions(
                        item.get('version_to_install'), vers) in (1, 2)):
                    return True
        except KeyError:
            # item is missing 'name', so doesn't match
            pass

    return False
Convert context data into a full Context object
dataset/ETHPy150Open munki/munki/code/client/munkilib/updatecheck.py/isItemInInstallInfo--crossover with--dataset/ETHPy150Open adieu/django-nonrel/django/template/response.py/SimpleTemplateResponse.resolve_context