def verify_packages(subset, all_packages):
 left_out = (set(subset) - set(all_packages))
 if left_out:
  raise ValueError('Unknown packages', sorted(left_out))

def verify_packages ( subset , all_packages ) : left_out = ( set ( subset ) - set ( all_packages ) ) if left_out : raise ValueError ( 'Unknown packages' , sorted ( left_out ) )
verify that a subset of packages are among all packages .