def METHOD_NAME(data, upgrader):
    #Get the settings from the original file.
    original_parser = configparser.ConfigParser(interpolation = None)
    original_parser.read_string(data["file_data"])
    settings = set()
    if original_parser.has_section("values"):
        settings = set(original_parser["values"])
    #Perform the upgrade.
    _, upgraded_container = upgrader.upgradeInstanceContainer(data["file_data"], "<string>")
    upgraded_container = upgraded_container[0]
    #Find whether the forbidden setting is still in the container.
    settings -= VersionUpgrade25to26._removed_settings
    parser = configparser.ConfigParser(interpolation = None)
    parser.read_string(upgraded_container)
    assert parser.has_section("values") == (len(settings) > 0) #If there are settings, there must also be the values category.
    if settings:
        assert settings == set(parser["values"])