code: def read_preferences_file(self):
          
          user_data_dir = find_pmag_dir.find_user_data_dir("thellier_gui")
          if not user_data_dir:
              return {}
          if os.path.exists(user_data_dir):
              pref_file = os.path.join(user_data_dir, "thellier_gui_preferences.json")
              if os.path.exists(pref_file):
                  with open(pref_file, "r") as pfile:
                      return json.load(pfile)
          return {}
docs: If json preferences file exists, read it in.