def METHOD_NAME(library):
    head = '<?xml version="1.0" encoding="utf-8" ?>'
    xml = library.dump_pdf_as_xml(TestFiles.invoice_pdf)  # get non-empty output
    assert xml.count(head) == 1
    xml = library.dump_pdf_as_xml(TestFiles.invoice_pdf)  # no double output
    assert xml.count(head) == 1