<commit_before># pylint: disable=B410
from xml.etree import ElementTree  # NOQA: B405

# pylint: disable=B410
from lxml.builder import E  # NOQA: B405

from api.iati.elements import ElementReference


class ConvertElementReference(ElementReference):
    root_element = 'root'

    def to_string(self, ):
        # To make XML we need root element
        self.parent_element = E(self.root_element)

        # Build XML
        self.create()

        # Convert to string
        xml_str = ElementTree.tostring(self.parent_element).decode()

        # We don't need only transaction element
        xml_str = xml_str.replace('<root>', '').replace('</root>', '')

        return xml_str<commit_msg>Updated pylint B410<commit_after># pylint: disable=B410
from xml.etree import ElementTree  # NOQA: B405

# pylint: disable=B410
from lxml.builder import E  # NOQA: B405, B410

from api.iati.elements import ElementReference


class ConvertElementReference(ElementReference):
    root_element = 'root'

    def to_string(self, ):
        # To make XML we need root element
        self.parent_element = E(self.root_element)

        # Build XML
        self.create()

        # Convert to string
        xml_str = ElementTree.tostring(self.parent_element).decode()

        # We don't need only transaction element
        xml_str = xml_str.replace('<root>', '').replace('</root>', '')

        return xml_str
{'fraction_non_alphanumeric': 0.10057061340941512, 'fraction_numerical': 0.021398002853067047, 'mean_word_length': 3.054913294797688, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '7212392', 'n_tokens_mistral': 451, 'n_tokens_neox': 411, 'n_words': 112}