<commit_before>
from .branch import Branch
from .polyroi import PolygonRoi
from .segmentroi import SegmentRoi

from dumb.util import bicycle

class BranchRoi(Branch,PolygonRoi):
    """
        Extend the PolygonRoi with children, splitting and segment selection.
    """

    # override PolygonRoi default thickness for not so thick branches
    thick = 3

    @PolygonRoi.active.setter
    def active(self,active):
        """
        Extend the polyroi _set_active property, to also deactivate contained segments.
        """
        if active == False:
            self.active_segment = None
        else:
            self.next_segment()
        # call the baseclass property setter
        PolygonRoi.active.fset(self,active)

    def __init__(self, branch, datasource, axes, **kwargs):
        Branch.__init__(self, data = branch)
        PolygonRoi.__init__(self, outline = self.outline, datasource = datasource, axes = axes, **kwargs)<commit_msg>docu improvement<commit_after>
from .branch import Branch
from .polyroi import PolygonRoi
from .segmentroi import SegmentRoi

from dumb.util import bicycle

class BranchRoi(Branch,PolygonRoi):
    """
        Extend the PolygonRoi with children, splitting and segment selection.
    """

    # override PolygonRoi default thickness for not so thick branches
    thick = 3

    @PolygonRoi.active.setter
    def active(self,active):
        """
        Extend the polyroi active property, to also deactivate contained segments.
        """
        if active == False:
            self.active_segment = None
        else:
            self.next_segment()
        # call the baseclass property setter
        PolygonRoi.active.fset(self,active)

    def __init__(self, branch, datasource, axes, **kwargs):
        Branch.__init__(self, data = branch)
        PolygonRoi.__init__(self, outline = self.outline, datasource = datasource, axes = axes, **kwargs)
{'fraction_non_alphanumeric': 0.08184679958027283, 'fraction_numerical': 0.001049317943336831, 'mean_word_length': 2.860323886639676, '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': '2426249', 'n_tokens_mistral': 550, 'n_tokens_neox': 530, 'n_words': 164}