<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_versions(self):
 """Configure a list of product versions from portal.quickinstaller """

        self.versions = {}
        self.upgrades = {}
        qi = getToolByName(self.context, "portal_quickinstaller")
        for key in qi.keys():
            self.versions[key] = qi.getProductVersion(key)
            info = qi.upgradeInfo(key)
            if info and 'installedVersion' in info:
                self.upgrades[key] = info['installedVersion']