docs: def _finalize_batch(self):
          """
          Method to finalize the batch, this will iterate over the _batches dict
          and create a PmtInf node for each batch. The correct information (from
          the batch_key and batch_totals) will be inserted and the batch
          transaction nodes will be folded. Finally, the batches will be added to
          the main XML.
          """
          for batch_meta, batch_nodes in self._batches.items():
              batch_meta_split = batch_meta.split("::")
              PmtInf_nodes = self._create_PmtInf_node()
              PmtInf_nodes['PmtInfIdNode'].text = make_id(self._config['name'])
              PmtInf_nodes['PmtMtdNode'].text = "DD"
              PmtInf_nodes['BtchBookgNode'].text = "true"
              PmtInf_nodes['Cd_SvcLvl_Node'].text = "SEPA"
              PmtInf_nodes['Cd_LclInstrm_Node'].text = self._config['instrument']
              PmtInf_nodes['SeqTpNode'].text = batch_meta_split[0]
              PmtInf_nodes['ReqdColltnDtNode'].text = batch_meta_split[1]
              PmtInf_nodes['Nm_Cdtr_Node'].text = self._config['name']
              PmtInf_nodes['IBAN_CdtrAcct_Node'].text = self._config['IBAN']
  
              if 'BIC' in self._config:
                  PmtInf_nodes['BIC_CdtrAgt_Node'].text = self._config['BIC']
  
              PmtInf_nodes['ChrgBrNode'].text = "SLEV"
              PmtInf_nodes['Nm_CdtrSchmeId_Node'].text = self._config['name']
              PmtInf_nodes['Id_Othr_Node'].text = self._config['creditor_id']
              PmtInf_nodes['PrtryNode'].text = "SEPA"
  
              PmtInf_nodes['NbOfTxsNode'].text = str(len(batch_nodes))
              PmtInf_nodes['CtrlSumNode'].text = int_to_decimal_str(self._batch_totals[batch_meta])
  
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['PmtInfIdNode'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['PmtMtdNode'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['BtchBookgNode'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['NbOfTxsNode'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['CtrlSumNode'])
  
              PmtInf_nodes['SvcLvlNode'].append(PmtInf_nodes['Cd_SvcLvl_Node'])
              PmtInf_nodes['LclInstrmNode'].append(
                  PmtInf_nodes['Cd_LclInstrm_Node'])
              PmtInf_nodes['PmtTpInfNode'].append(PmtInf_nodes['SvcLvlNode'])
              PmtInf_nodes['PmtTpInfNode'].append(PmtInf_nodes['LclInstrmNode'])
              PmtInf_nodes['PmtTpInfNode'].append(PmtInf_nodes['SeqTpNode'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['PmtTpInfNode'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['ReqdColltnDtNode'])
  
              PmtInf_nodes['CdtrNode'].append(PmtInf_nodes['Nm_Cdtr_Node'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['CdtrNode'])
  
              PmtInf_nodes['Id_CdtrAcct_Node'].append(
                  PmtInf_nodes['IBAN_CdtrAcct_Node'])
              PmtInf_nodes['CdtrAcctNode'].append(
                  PmtInf_nodes['Id_CdtrAcct_Node'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['CdtrAcctNode'])
  
              if 'BIC' in self._config:
                  PmtInf_nodes['FinInstnId_CdtrAgt_Node'].append(
                      PmtInf_nodes['BIC_CdtrAgt_Node'])
              PmtInf_nodes['CdtrAgtNode'].append(
                  PmtInf_nodes['FinInstnId_CdtrAgt_Node'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['CdtrAgtNode'])
  
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['ChrgBrNode'])
  
              if self.schema == 'pain.008.001.02':
                  PmtInf_nodes['CdtrSchmeIdNode'].append(PmtInf_nodes['Nm_CdtrSchmeId_Node'])
              PmtInf_nodes['OthrNode'].append(PmtInf_nodes['Id_Othr_Node'])
              PmtInf_nodes['SchmeNmNode'].append(PmtInf_nodes['PrtryNode'])
              PmtInf_nodes['OthrNode'].append(PmtInf_nodes['SchmeNmNode'])
              PmtInf_nodes['PrvtIdNode'].append(PmtInf_nodes['OthrNode'])
              PmtInf_nodes['Id_CdtrSchmeId_Node'].append(
                  PmtInf_nodes['PrvtIdNode'])
              PmtInf_nodes['CdtrSchmeIdNode'].append(
                  PmtInf_nodes['Id_CdtrSchmeId_Node'])
              PmtInf_nodes['PmtInfNode'].append(PmtInf_nodes['CdtrSchmeIdNode'])
  
              for txnode in batch_nodes:
                  PmtInf_nodes['PmtInfNode'].append(txnode)
  
              CstmrDrctDbtInitn_node = self._xml.find('CstmrDrctDbtInitn')
              CstmrDrctDbtInitn_node.append(PmtInf_nodes['PmtInfNode'])