def add_installed(files, unreqed):
    unique = [dict(y) for y in set(tuple(x.items()) for x in unreqed)]
    for package_d in unique:
        for package, version in package_d.items():
            # import pdb; pdb.set_trace()
            click.echo(
                u'{} is installed but not in any requirements file'.format(
                    package))
            pstr = '[0] Ignore\n'
            for index, rf in enumerate(files):
                pstr += '[{}] Add to {}\n'.format(index + 1, rf['name'])
            value = click.prompt(pstr, type=int)
            try:
                req_file = files[value - 1]
            except __HOLE__:
                click.echo('Not a valid selection soz.')
            else:
                req_file['packages'][package] = version
                req_file['updated'].append(package)
dataset/ETHPy150Open hactar-is/olaf/olaf/cli.py/add_installed