<commit_before>import sys
import time
import re
import fnmatch
import ROOT
import inspect
from ..types import *
from ..core import Object, camelCaseMethods
from ..plotting.core import Plottable
from ..registry import register, lookup_by_name
from ..utils import asrootpy, create
from ..io import open as ropen
from .filtering import *
from ROOT import TTreeCache


class TreeModelMeta(type):

    def __add__(cls, other):

        return type('_'.join([cls.__name__, other.__name__]),
                    tuple(set(cls.__bases__).union(set(other.__bases__))), {})

    def __sub__(cls, other):
        
        return type('_'.join([cls.__name__, other.__name__]),
                    tuple(set(cls.__bases__).union(set(other.__bases__))), {})


class TreeModel(object):

    __metaclass__ = TreeModelMeta

    @classmethod
    def get_buffer(cls):
        boring = dir(type('dummy', (object,), {}))+['get_buffer']
        attrs = [item
                for item in inspect.getmembers(cls)
                if item[0] not in boring]
        buffer = TreeBuffer()
        for name, attr in attrs:
            buffer[name] = attr()
        return buffer


class TreeObject(object):

    def __init__(self, tree, name, prefix):

        self.tree = tree
        self.name = name
        self.prefix = prefix

    def __eq__(self, other):
<commit_msg>updates<commit_after>import sys
import time
import re
import fnmatch
import ROOT
import inspect
from ..types import *
from ..core import Object, camelCaseMethods
from ..plotting.core import Plottable
from ..registry import register, lookup_by_name
from ..utils import asrootpy, create
from ..io import open as ropen
from .filtering import *
from ROOT import TTreeCache


class TreeModelMeta(type):

    def __add__(cls, other):

        
        _dict = dict(set(cls.get_attrs()).union(set(other.get_attrs())))
        return type('_'.join([cls.__name__, other.__name__]),
                    tuple(set(cls.__bases__).union(set(other.__bases__))), _dict)

    def __sub__(cls, other):
        
        _dict = dict(set(cls.get_attrs()).difference(set(other.get_attrs())))
        return type('_'.join([cls.__name__, other.__name__]),
                    tuple(set(cls.__bases__).union(set(other.__bases__))), _dict)


class TreeModel(object):

    __metaclass__ = TreeModelMeta

    @classmethod
    def get_attrs(cls):

        boring = dir(type('dummy', (object,), {}))+['get_buffer', 'get_attrs']
        attrs = [item
                for item in inspect.getmembers(cls)
                if item[0] not in boring]
        return attrs

    @classmethod
    def get_buffer(cls):

        for name, attr in cls.get_attrs():
            buffer[name] = attr()
        return buffer


class TreeObject(object):

    def __init__(self, tree, name, prefix):

        self.tree = tree
        self.name = name
        self.prefix = prefix

    def __eq__(self, other):

{'fraction_non_alphanumeric': 0.11588720770288859, 'fraction_numerical': 0.000687757909215956, 'mean_word_length': 2.677623261694058, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6570099', 'n_tokens_mistral': 880, 'n_tokens_neox': 850, 'n_words': 234}