<commit_before>import xmltodict
from flask._compat import text_type
from flask_api import exceptions
from flask_api.parsers import BaseParser


class MicroserviceXMLParser(BaseParser):
    media_type = 'application/xml'

    def parse(self, stream, media_type, **options):
        data = stream.read().decode('utf-8')<commit_msg>fix importing error<commit_after>from flask._compat import text_type
from flask_api import exceptions
from flask_api.parsers import BaseParser


class MicroserviceXMLParser(BaseParser):
    media_type = 'application/xml'

    def parse(self, stream, media_type, **options):
        import xmltodict

        data = stream.read().decode('utf-8')
{'fraction_non_alphanumeric': 0.08915304606240713, 'fraction_numerical': 0.0029717682020802376, 'mean_word_length': 4.912280701754386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '7460865', 'n_tokens_mistral': 200, 'n_tokens_neox': 187, 'n_words': 51}