<commit_before><?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?python
  from datetime import datetime
  import time
  import fpformat
?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:py="http://genshi.edgewall.org/">
    <?python
        mandate = data['mandate']
        original_mandatae = data['mandate'].orginal_mandate
    ?>
    <CstmrCdtTrfInitn>
        <!-- Header -->
        <GrpHdr>
            <MsgId py:content="time.strftime('%Y%m%d%H%M%S')"></MsgId>
            <CreDtTm py:content="time.strftime('%Y-%m-%dT%H:%M:%S')"></CreDtTm>
            <NbOfTxs py:content="len(data['list_voucher'])"></NbOfTxs>
            <CtrlSum py:content="fpformat.fix(data['total_amount'], 2)"></CtrlSum>
            <InitgPty>
                <Nm py:content="data['company_name'][:70]"></Nm>
            </InitgPty>
        </GrpHdr>
        <!-- Payment Group -->
        <PmtInf>
            <PmtInfId py:content="data['list_voucher'][0].number"></PmtInfId>
            <PmtMtd>DD</PmtMtd>
            <BtchBookg></BtchBookg> <!-- TODO -->
            <NbOfTxs py:content="len(data['list_voucher'])"></NbOfTxs>
            <CtrlSum py:content="fpformat.fix(data['total_amount'], 2)"></CtrlSum>
            <PmtTpInf>
                <SvcLvl>
                    <Cd>SEPA</Cd>
                </SvcLvl>
                <LclInstrm>
                    <Cd>CORE</Cd> <!-- TODO Either CORE or B2B -->
                </LclInstrm>
                <SeqTp></SeqTp> <!-- TODO One of FSRT, RCUR, FNAL, OOF -->
            </PmtTpInf>
            <!--CtgyPurp-->
                <!--Cd></Cd--> <!-- TODO value taken from a list of purpose code list -->
            <!--/CtgyPurp-->
            <ReqdExctnDt py:content="datetime.strptime(data['date'], '%Y-%m-%d').date().isoformat()"></ReqdExctnDt>
            <Cdtr>
                <Nm py:content="data['company_name'][:70]"></Nm>
            </Cdtr>
            <CdtrAcct>
                <Id>
                    <IBAN py:content="(data['debtor_bank'].iban or data['debtor_bank'].acc_number).replace(' ', '').upper()"></IBAN>
                </Id>
                <Ccy></Ccy> <!-- Currency -->
            </CdtrAcct>
            <CdtrAgt>
                <FinInstnId>
                    <BIC py:content="data['debtor_bank'].bank_bic.replace(' ', '').upper()"></BIC>
                </FinInstnId>
            </CdtrAgt>
            <UltmtCdr>
                <Nm></Nm> <!-- TODO creditor name -->
                <Id>
                    <OrgId></OrgId> <!-- TODO either BIC or BEI -->
                </Id>
            </UltmtCdr>
            <ChrgBr>SLEV</ChrgBr> <!-- TODO optional element, figure out when to specify  -->
            <CdtrSchmeId>
                <Id>
                    <PrvtId>
                        <Other>
                            <Id></Id> <!-- 2.27 TODO SEPA creditor Id -->
                            <SchmeNm>
                                <Prtry>SEPA</Prtry>
                            </SchmeNm>
                        </Other>
                    </PrvtId>
                </Id>
            </CdtrSchmeId>
            <!-- Transactions -->
            <DrctDbtTxInf py:for="i, voucher in enumerate(data['list_voucher'])">
                <PmtId><commit_msg>Replacing references to 'debtor' with 'creditor' where appropriate<commit_after><?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?python
  from datetime import datetime
  import time
  import fpformat
?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:py="http://genshi.edgewall.org/">
    <?python
        mandate = data['mandate']
        original_mandatae = data['mandate'].orginal_mandate
    ?>
    <CstmrCdtTrfInitn>
        <!-- Header -->
        <GrpHdr>
            <MsgId py:content="time.strftime('%Y%m%d%H%M%S')"></MsgId>
            <CreDtTm py:content="time.strftime('%Y-%m-%dT%H:%M:%S')"></CreDtTm>
            <NbOfTxs py:content="len(data['list_voucher'])"></NbOfTxs>
            <CtrlSum py:content="fpformat.fix(data['total_amount'], 2)"></CtrlSum>
            <InitgPty>
                <Nm py:content="data['company_name'][:70]"></Nm>
            </InitgPty>
        </GrpHdr>
        <!-- Payment Group -->
        <PmtInf>
            <PmtInfId py:content="data['list_voucher'][0].number"></PmtInfId>
            <PmtMtd>DD</PmtMtd>
            <BtchBookg></BtchBookg> <!-- TODO -->
            <NbOfTxs py:content="len(data['list_voucher'])"></NbOfTxs>
            <CtrlSum py:content="fpformat.fix(data['total_amount'], 2)"></CtrlSum>
            <PmtTpInf>
                <SvcLvl>
                    <Cd>SEPA</Cd>
                </SvcLvl>
                <LclInstrm>
                    <Cd>CORE</Cd> <!-- TODO Either CORE or B2B -->
                </LclInstrm>
                <SeqTp></SeqTp> <!-- TODO One of FSRT, RCUR, FNAL, OOF -->
            </PmtTpInf>
            <!--CtgyPurp-->
                <!--Cd></Cd--> <!-- TODO value taken from a list of purpose code list -->
            <!--/CtgyPurp-->
            <ReqdExctnDt py:content="datetime.strptime(data['date'], '%Y-%m-%d').date().isoformat()"></ReqdExctnDt>
            <Cdtr>
                <Nm py:content="data['company_name'][:70]"></Nm>
            </Cdtr>
            <CdtrAcct>
                <Id>
                    <IBAN py:content="(data['creditor_bank'].iban or data['creditor_bank'].acc_number).replace(' ', '').upper()"></IBAN>
                </Id>
                <Ccy></Ccy> <!-- Currency -->
            </CdtrAcct>
            <CdtrAgt>
                <FinInstnId>
                    <BIC py:content="data['creditor_bank'].bank_bic.replace(' ', '').upper()"></BIC>
                </FinInstnId>
            </CdtrAgt>
            <UltmtCdr>
                <Nm></Nm> <!-- TODO creditor name -->
                <Id>
                    <OrgId></OrgId> <!-- TODO either BIC or BEI -->
                </Id>
            </UltmtCdr>
            <ChrgBr>SLEV</ChrgBr> <!-- TODO optional element, figure out when to specify  -->
            <CdtrSchmeId>
                <Id>
                    <PrvtId>
                        <Other>
                            <Id></Id> <!-- 2.27 TODO SEPA creditor Id -->
                            <SchmeNm>
                                <Prtry>SEPA</Prtry>
                            </SchmeNm>
                        </Other>
                    </PrvtId>
                </Id>
            </CdtrSchmeId>
            <!-- Transactions -->
            <DrctDbtTxInf py:for="i, voucher in enumerate(data['list_voucher'])">
                <PmtId>
{'fraction_non_alphanumeric': 0.17541206714048088, 'fraction_numerical': 0.008165734159987902, 'mean_word_length': 1.440590405904059, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 2, '>': 211, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1183745', 'n_tokens_mistral': 2269, 'n_tokens_neox': 2087, 'n_words': 320}