<commit_before>try:
    from collections import OrderedDict #ordered to pass tests in python 3+
    AttribDict = lambda normalDict: OrderedDict(normalDict)
except ImportError:
    AttribDict = lambda normalDict: normalDict

class ProtocolTreeNode():
    
    def __init__(self, tag, attributes, children = None, data = None):

        
        self.tag = tag;
        self.attributes = AttribDict(attributes);
        self.children = children;
        self.data = data

        assert children is None or type(self.children) is list, "Children must be a list"
        
    def toString(self):
        out = "<"+self.tag;<commit_msg>ProtocolTreeNode has attributes now optional<commit_after>try:
    from collections import OrderedDict #ordered to pass tests in python 3+
    AttribDict = lambda normalDict: OrderedDict(normalDict)
except ImportError:
    AttribDict = lambda normalDict: normalDict

class ProtocolTreeNode():
    
    def __init__(self, tag, attributes = {}, children = None, data = None):

        
        self.tag = tag;
        self.attributes = AttribDict(attributes);
        self.children = children;
        self.data = data

        assert children is None or type(self.children) is list, "Children must be a list"
        
    def toString(self):
        out = "<"+self.tag;
{'fraction_non_alphanumeric': 0.08538461538461538, 'fraction_numerical': 0.0015384615384615385, 'mean_word_length': 2.8605341246290803, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4606159', 'n_tokens_mistral': 352, 'n_tokens_neox': 346, 'n_words': 117}