code: def assert_processor_available(processor: str) -> None:
      
      if processor not in [Processors.XHTML2PDF,
                           Processors.WEASYPRINT,
                           Processors.PDFKIT]:
          raise AssertionError("rnc_pdf.set_pdf_processor: invalid PDF processor"
                               " specified")
      if processor == Processors.WEASYPRINT and not weasyprint:
          raise RuntimeError("rnc_pdf: Weasyprint requested, but not available")
      if processor == Processors.XHTML2PDF and not xhtml2pdf:
          raise RuntimeError("rnc_pdf: xhtml2pdf requested, but not available")
      if processor == Processors.PDFKIT and not pdfkit:
          raise RuntimeError("rnc_pdf: pdfkit requested, but not available")
docs: Assert that a specific PDF processor is available.
  
      Args:
          processor: a PDF processor type from :class:`Processors`
  
      Raises:
          AssertionError: if bad ``processor``
          RuntimeError: if requested processor is unavailable