<commit_before>#!/usr/bin/env python


from ..externals.gtp import GTP
from ...remote.datastructs.tree import Tree
from ...remote.utils import dpy

class TrClTree(Tree):

    def geodist(self, other):
        gtp = GTP()
        return gtp.pairwise(self, other)

    @classmethod
    def cast(cls, tree):
        """ Copies Tree object as TrClTree object """
        cast = Tree.__new__(TrClTree)
        cast.__dict__ = {key: value for (key, value) in tree.__dict__.items()}
        cast.rooted = dpy.check_rooted(tree.newick)
        return cast<commit_msg>Fixed cast to local Tree object from remote Tree object<commit_after>#!/usr/bin/env python


from ..externals.gtp import GTP
from ...remote.datastructs.tree import Tree
from ...remote.utils import dpy

class TrClTree(Tree):

    def geodist(self, other):
        gtp = GTP()
        return gtp.pairwise(self, other)

    @classmethod
    def cast(cls, tree):
        """ Copies Tree object as TrClTree object """
        cast = Tree.__new__(TrClTree)
        cast.__dict__ = {key: value for (key, value) in tree.__dict__.items()}
        # cast.rooted = dpy.check_rooted(tree.newick)
        return cast
{'fraction_non_alphanumeric': 0.11617900172117039, 'fraction_numerical': 0.0, 'mean_word_length': 2.763754045307443, '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': '2117770', 'n_tokens_mistral': 377, 'n_tokens_neox': 364, 'n_words': 104}