from UM.Preferences import Preferences # get the singleton Preferences object prefs = Preferences.getInstance() # set a preference value prefs.setValue("language", "english") # get a preference value language = prefs.getValue("language")In the above example, we get an instance of the Preferences object using `getInstance()` and use it to set and get a preference value. In this case, we set the "language" preference to "english" and then retrieve it with `getValue()`. Based on the import statement, it seems like the UM.Preferences library is part of the Ultimaker package.