code: def parse_plist(self, preferences_file):
          
          preferences_file = os.path.expanduser(preferences_file)
  
          # Try to open using FoundationPlist. If it's not available,
          # fall back to plistlib and hope it's not binary encoded.
          try:
              prefs = FoundationPlist.readPlist(preferences_file)
          except NameError:
              try:
                  prefs = plistlib.readPlist(preferences_file)
              except ExpatError:
                  # If we're on OSX, try to convert using another
                  # tool.
                  if is_osx():
                      subprocess.call(["plutil", "-convert", "xml1",
                                       preferences_file])
                      prefs = plistlib.readPlist(preferences_file)
  
          self.preferences_file = preferences_file
          self.user = prefs.get("jss_user")
          self.password = prefs.get("jss_pass")
          self.url = prefs.get("jss_url")
          if not all([self.user, self.password, self.url]):
              raise JSSPrefsMissingKeyError("Please provide all required "
                                            "preferences!")
  
          # Optional file repository array. Defaults to empty list.
          self.repos = []
          for repo in prefs.get("repos", []):
              self.repos.append(dict(repo))
  
          self.verify = prefs.get("verify", True)
          self.suppress_warnings = prefs.get("suppress_warnings", True)
docs: Try to reset preferences from preference_file.