def METHOD_NAME(self) -> Optional[Tuple[List[str], List[str]]]:
    import VersionUpgrade21to22 # Import here to prevent circular dependencies.
    if self._name == "Current settings":
        return None #Can't upgrade these, because the new current profile needs to specify the definition ID and the old file only had the machine instance, not the definition.
    config = configparser.ConfigParser(interpolation = None)
    config.add_section("general")
    config.set("general", "version", "2") #Hard-coded profile version 2.
    config.set("general", "name", self._name)
    if self._machine_type_id:
        translated_machine = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinter(self._machine_type_id)
        config.set("general", "definition", translated_machine)
    else:
        config.set("general", "definition", "fdmprinter") #In this case, the machine definition is unknown, and it might now have machine-specific profiles, in which case this will fail.
    config.add_section("metadata")
    config.set("metadata", "quality_type", "normal") #This feature doesn't exist in 2.1 yet, so we don't know the actual quality type. For now, always base it on normal.
    config.set("metadata", "type", "quality")
    if self._weight:
        config.set("metadata", "weight", str(self._weight))
    if self._machine_variant_name:
        if self._machine_type_id:
            config.set("metadata", "variant", VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateVariant(self._machine_variant_name, self._machine_type_id))
        else:
            config.set("metadata", "variant", self._machine_variant_name)
    if self._settings:
        self._settings = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateSettings(self._settings)
        config.add_section("values")
        for key, value in self._settings.items():
            config.set("values", key, str(value))
    if self._changed_settings_defaults:
        self._changed_settings_defaults = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateSettings(self._changed_settings_defaults)
        config.add_section("defaults")
        for key, value in self._changed_settings_defaults.items():
            config.set("defaults", key, str(value))
    if self._disabled_settings_defaults:
        disabled_settings_defaults = [VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateSettingName(setting)
                                      for setting in self._disabled_settings_defaults]
        config.add_section("disabled_defaults")
        disabled_defaults_string = str(disabled_settings_defaults[0]) #Must be at least 1 item, otherwise we wouldn't enter this if statement.
        for item in disabled_settings_defaults[1:]:
            disabled_defaults_string += "," + str(item)
    output = io.StringIO()
    config.write(output)
    return [self._filename], [output.getvalue()