def get_auto_removal_items(installinfo, cataloglist):
    'Gets a list of items marked for automatic removal from the catalogs\n    in cataloglist. Filters those against items in the processed_installs\n    list, which should contain everything that is supposed to be installed.\n    Then filters against the removals list, which contains all the removals\n    that have already been processed.\n    '
    autoremovalnames = []
    for catalogname in (cataloglist or []):
        if (catalogname in list(_CATALOG.keys())):
            autoremovalnames += _CATALOG[catalogname]['autoremoveitems']
    processed_installs_names = [split_name_and_version(item)[0] for item in installinfo['processed_installs']]
    autoremovalnames = [item for item in autoremovalnames if ((item not in processed_installs_names) and (item not in installinfo['processed_uninstalls']))]
    return autoremovalnames
Gets a list of items marked for automatic removal from the catalogs
in cataloglist. Filters those against items in the processed_installs
list, which should contain everything that is supposed to be installed.
Then filters against the removals list, which contains all the removals
that have already been processed.
def get_auto_removal_items(installinfo, cataloglist):
    'Gets a list of items marked for automatic removal from the catalogs\n    in cataloglist. Filters those against items in the processed_installs\n    list, which should contain everything that is supposed to be installed.\n    Then filters against the removals list, which contains all the removals\n    that have already been processed.\n    '
    autoremovalnames = []
    for catalogname in (cataloglist or []):
        if (catalogname in list(_CATALOG.keys())):
            autoremovalnames += _CATALOG[catalogname]['autoremoveitems']
    processed_installs_names = [split_name_and_version(item)[0] for item in installinfo['processed_installs']]
    autoremovalnames = [item for item in autoremovalnames if ((item not in processed_installs_names) and (item not in installinfo['processed_uninstalls']))]
    return autoremovalnames