def METHOD_NAME(sample_invoice):
    xml = sample_invoice.to_xml()
    assert xml is not None
    header = xml.xpath(
        "/p:FatturaElettronica/FatturaElettronicaHeader",
        namespaces={
            "p": "http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"
        },
    )[0]
    t_data = header.xpath("DatiTrasmissione")[0]
    assert t_data.xpath("IdTrasmittente/IdPaese")[0].text == "IT"
    assert t_data.xpath("IdTrasmittente/IdCodice")[0].text == "PIABCDE"
    assert t_data.xpath("ProgressivoInvio")[0].text == "1"
    assert t_data.xpath("FormatoTrasmissione")[0].text == "FPR12"
    assert t_data.xpath("CodiceDestinatario")[0].text == "ABCDEFG"
    assert len(t_data.xpath("PecDestinatario")) == 0
    # TODO: might need to add this to the invoice, in order to be able to
    # TODO: use different party for invoices (if ever needed)
    # Supplier data
    s_data = header.xpath("CedentePrestatore/DatiAnagrafici")[0]
    assert s_data.xpath("IdFiscaleIVA/IdPaese")[0].text == "IT"
    # TODO: add this to the model if it is the P. IVA
    # assert s_data.xpath("IdFiscaleIVA/IdCodice")[0].text == "IT"
    assert s_data.xpath("RegimeFiscale")[0].text == "RF01"
    assert s_data.xpath("Anagrafica/Denominazione")[0].text == "Python Italia APS"
    a_data = header.xpath("CedentePrestatore/Sede")[0]
    assert a_data.xpath("Indirizzo")[0].text == "Via Mugellese 1/A"
    assert a_data.xpath("CAP")[0].text == "50013"
    assert a_data.xpath("Comune")[0].text == "Campi Bisenzio"
    assert a_data.xpath("Provincia")[0].text == "FI"
    assert a_data.xpath("Nazione")[0].text == "IT"
    # Client data
    c_data = header.xpath("CessionarioCommittente/DatiAnagrafici")[0]
    assert c_data.xpath("IdFiscaleIVA/IdPaese")[0].text == "IT"
    # TODO: this should be vat code
    assert c_data.xpath("IdFiscaleIVA/IdCodice")[0].text == "aaabbb12b34z123d"
    # assert c_data.xpath("Anagrafica/Nome")[0].text == "Patrick"
    # assert c_data.xpath("Anagrafica/Cognome")[0].text == "A"
    ca_data = header.xpath("CessionarioCommittente/Sede")[0]
    assert ca_data.xpath("Indirizzo")[0].text == "Via Roma 1"
    assert ca_data.xpath("CAP")[0].text == "83100"
    assert ca_data.xpath("Comune")[0].text == "Avellino"
    assert ca_data.xpath("Provincia")[0].text == "AV"
    assert ca_data.xpath("Nazione")[0].text == "IT"