<commit_before>class PrettySimpleXML():
    """A simple little pretty print XML generator."""
    def __init__(self, width=4):
        self._output = []
        self._open_tags = []
        self._width = " " * width
        self._depth = 0

    def _untrim(self, string, newline):
        """Inserts indentation and newline to a string."""
        if not isinstance(string, str):
            raise ValueError("first argument must be of type: string")
        if not isinstance(newline, bool):
            raise ValueError("second argument must be of type: boolean")
        lead = "" if not self._output or self._output[-1][-1] != "\n" else self._depth * self._width
        trail = "" if not newline else "\n"
        return lead + string + trail

    def _raw(self, string, newline):
        """Add a string exactly as given."""
        self._output.append(self._untrim(string, newline))
        return self

    def _empty(self, tag, attr=[], newline):
        """Add an empty element."""
        self._output.append(self._untrim("<{} {} />".format(tag, " ".join(attr)), newline))
        return self

    def _begin(self, tag, attr=[], value="", newline):
        """Begin and add a new element."""
        self._open_tags.append(tag)
        self._output.append(self._untrim("<{} {}>{}".format(tag, " ".join(attr), value), newline))
        self._depth += 1
        return self

    def _end(self, newline):
        """End an element."""
        self._depth -= 1
        self._output.append(self._untrim("</{}>".format(self._open_tags.pop()), newline))
        return self

    def output(self):
        """Returns the output in pretty print."""
        return "".join(self._output)<commit_msg>Non-default argument follows default argument.<commit_after>class PrettySimpleXML():
    """A simple little pretty print XML generator."""
    def __init__(self, width=4):
        self._output = []
        self._open_tags = []
        self._width = " " * width
        self._depth = 0

    def _untrim(self, string, newline):
        """Inserts indentation and newline to a string."""
        if not isinstance(string, str):
            raise ValueError("first argument must be of type: string")
        if not isinstance(newline, bool):
            raise ValueError("second argument must be of type: boolean")
        lead = "" if not self._output or self._output[-1][-1] != "\n" else self._depth * self._width
        trail = "" if not newline else "\n"
        return lead + string + trail

    def _raw(self, string, newline):
        """Add a string exactly as given."""
        self._output.append(self._untrim(string, newline))
        return self

    def _empty(self, tag, attr, newline):
        """Add an empty element."""
        self._output.append(self._untrim("<{} {} />".format(tag, " ".join(attr)), newline))
        return self

    def _begin(self, tag, attr, value, newline):
        """Begin and add a new element."""
        self._open_tags.append(tag)
        self._output.append(self._untrim("<{} {}>{}".format(tag, " ".join(attr), value), newline))
        self._depth += 1
        return self

    def _end(self, newline):
        """End an element."""
        self._depth -= 1
        self._output.append(self._untrim("</{}>".format(self._open_tags.pop()), newline))
        return self

    def output(self):
        """Returns the output in pretty print."""
        return "".join(self._output)
{'fraction_non_alphanumeric': 0.14932787843366452, 'fraction_numerical': 0.0035067212156633548, 'mean_word_length': 2.4540867810292633, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '578810', 'n_tokens_mistral': 968, 'n_tokens_neox': 956, 'n_words': 295}