code: def filter_installed_packages(packages):
      
      cache = apt_cache()
      _pkgs = []
      for package in packages:
          try:
              p = cache[package]
              p.current_ver or _pkgs.append(package)
          except KeyError:
              log('Package {} has no installation candidate.'.format(package),
                  level='WARNING')
              _pkgs.append(package)
      return _pkgs
docs: Return a list of packages that require installation.