def get_repos_from_vimorg_descriptions():
    """Extract URLs of GitHub repos from the long descriptions on vim.org."""
    print "Discovering GitHub repos from vim.org long descriptions ..."

    # A map of repo URL to the vimorg_ids they were found in.
    repo_urls_dict = collections.defaultdict(set)

    all_plugins = r.table('plugins').run(r_conn())
    for plugin in all_plugins:
        for field in ['vimorg_long_desc', 'vimorg_install_details']:
            if plugin in field and plugin[field]:
                repo_urls = set(_extract_github_repo_urls(plugin[field]))
                vimorg_id = plugin['vimorg_id']
                # TODO(captbaritone) Re-enable this assertion once there is
                # only one plugin per `vimorg_id`
                # assert vimorg_id
                if not vimorg_id:
                    continue
                for repo_url in repo_urls:
                    repo_urls_dict[repo_url].add(vimorg_id)

    num_inserted = 0
    for repo_url, vimorg_ids in repo_urls_dict.iteritems():
        _, owner, repo_name = repo_url.split('/')
        inserted = PluginGithubRepos.upsert_with_owner_repo({
            'owner': owner,
            'repo_name': repo_name,
            'from_vim_scripts': list(vimorg_ids),
        })
        num_inserted += int(inserted)

    print "Found %s GitHub repos; inserted %s new ones." % (
            len(repo_urls_dict), num_inserted)
dataset/ETHPy150Open vim-awesome/vim-awesome/tools/scrape/build_github_index.py/get_repos_from_vimorg_descriptions/swapped operands of `in`