def METHOD_NAME(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
    """
    Upgrades preferences to remove from the visibility list the settings that were removed in this version.
    It also changes the preferences to have the new version number.
    This removes any settings that were removed in the new Cura version.
    :param serialized: The original contents of the preferences file.
    :param filename: The file name of the preferences file.
    :return: A list of new file names, and a list of the new contents for
    those files.
    """
    parser = configparser.ConfigParser(interpolation = None)
    parser.read_string(serialized)
    # Update version number.
    parser["metadata"]["setting_version"] = "20"
    # Remove deleted settings from the visible settings list.
    if "general" in parser and "visible_settings" in parser["general"]:
        visible_settings = set(parser["general"]["visible_settings"].split(";"))
        for removed in _removed_settings:
            if removed in visible_settings:
                visible_settings.remove(removed)
        # Replace equivalent settings that have been transformed.
        for old, new in _transformed_settings.items():
            if old in visible_settings:
                visible_settings.remove(old)
                visible_settings.add(new)
        parser["general"]["visible_settings"] = ";".join(visible_settings)
    result = io.StringIO()
    parser.write(result)
    return [filename], [result.getvalue()]