def retrieve_upstream_versions():
    upstream_versions = dict()
    for project in VERSIONS['local']:
        winner = None
        series = VERSIONS['local'][project].split('.')[0]
        base = '{}/{}'.format(TARBALLS_BASE_URL, project)
        r = requests.get(base)
        s = bs(r.text, 'html.parser')

        for link in s.find_all('a'):
            version = link.get('href')
            if (version.endswith('.tar.gz') and
                    version.startswith('{}-{}'.format(project, series))):
                split = '{}-|.tar.gz'.format(project)
                candidate = re.split(split, version)[1]
                # Ignore 2014, 2015 versions as they are older
                if candidate.startswith('201'):
                    continue
                if not winner or more_recent(candidate, winner):
                    winner = candidate

        if not winner:
            print('Could not find version for {}'.format(project))
            continue

        if winner in '-':
            winner = winner.split('-')[1]
        upstream_versions[project] = winner

    VERSIONS['upstream'] = collections.OrderedDict(
        sorted(upstream_versions.items()))
dataset/ETHPy150Open openstack/kolla/tools/version_check.py/retrieve_upstream_versions/swapped operands of `in`