code: def verify_packages_installed(self, package_names):
          
          if not package_names:
              raise ValueError('package_names required.')
  
          missing_packages = []
          for package_name in package_names:
              if not self.is_package_installed(package_name):
                  missing_packages.append(package_name)
  
          if missing_packages:
              comma_packages = ', '.join(missing_packages)
              message = '''
  Required RPM not installed: [{0}].
  Install the RPM package.
  '''.format(comma_packages)
              raise InstallError(message)
docs: Check if the RPM packages are installed.
  
          Raise InstallError if any of the packages is not installed.