<commit_before>"""Import a newick formatted tree txt file and view it."""
import warnings

from Bio import Phylo

from Datasnakes.Orthologs import OrthologsDevelopmentWarning

# Warn users about this module
warnings.warn('Orthologs.Phylogenetics.PhyloTree is still under development and '
              'may undergo significant changes prior to its official release.',
              OrthologsDevelopmentWarning)


class TreeViz(object):
    """Vizualize a newick tree."""

    def __init__(self, path2tree):
        """Import the path to the tree."""
        self.path2tree = path2tree

    def drawtree(self, treeformat='newick'):
        """Import a newick formatted tree and visualize it."""
        tree = Phylo.read(self.path2tree, treeformat)
        Phylo.draw(tree)
<commit_msg>Added a docstring to treeviz.py<commit_after>"""Import a newick formatted tree txt file and view it."""
import warnings

from Bio import Phylo

from Datasnakes.Orthologs import OrthologsDevelopmentWarning

# Warn users about this module
warnings.warn('This module is still under development and '
              'may undergo significant changes prior to its official release.',
              OrthologsDevelopmentWarning)


class TreeViz(object):
    """Tools that allow visualization of a newick formatted tree."""
    def __init__(self, path2tree):
        """Import the path to the tree."""
        self.path2tree = path2tree

    def drawtree(self, treeformat='newick'):
        """Import a newick formatted tree and visualize it."""
        tree = Phylo.read(self.path2tree, treeformat)
        Phylo.draw(tree)

{'fraction_non_alphanumeric': 0.08557151780137415, 'fraction_numerical': 0.004996876951905059, 'mean_word_length': 3.4132231404958677, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2138126', 'n_tokens_mistral': 462, 'n_tokens_neox': 435, 'n_words': 156}