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

"""
A custom Mark and mark generator to create Toytree drawings in toyplot.
"""
import numpy as np
import xml.etree.ElementTree as xml
import toyplot
from toyplot.mark import Mark
from toyplot.html import _draw_bar, _draw_triangle, _draw_circle, _draw_rect
from .TreeStyle import COLORS1
# from toytree.utils import ToytreeError

# Register multipledispatch to share with toyplot.html
import functools
from multipledispatch import dispatch
dispatch = functools.partial(dispatch, namespace=toyplot.html._namespace)

"""
- randomtree argument to makes names random or not.
- layout='r' seems to be making extents on top too big... (or not)
- fixed-order fix.
- fixed-order extension to tip positions for missing labels..?
- ipcoal .newick fix.
- rawtree consensus checking...
- container tree check.
"""


PATH_FORMAT = {
    'c': "M {px:.1f} {py:.1f} L {cx:.1f} {cy:.1f}",
    'b1': "M {px:.1f} {py:.1f} C {px:.1f} {cy:.1f}, {px:.1f} {cy:.1f}, {cx:.1f} {cy:.3f}",
    'b2': "M {px:.1f} {py:.1f} C {cx:.1f} {py:.1f}, {cx:.1f} {py:.1f}, {cx:.1f} {cy:.3f}",    
    'p1': "M {px:.1f} {py:.1f} L {px:.1f} {cy:.1f} L {cx:.1f} {cy:.1f}",
    'p2': "M {px:.1f} {py:.1f} L {cx:.1f} {py:.1f} L {cx:.1f} {cy:.1f}",
    'pc': "M {cx:.1f} {cy:.1f} L {dx:.1f} {dy:.1f} A {rr:.1f} {rr:.1f} 0 0 {flag} {px:.1f} {py:.1f}",
}


class ToytreeMark(Mark):
    """
    Custom mark testing.
    """
    def __init__(<commit_msg>cosmetic<commit_after>#!/usr/bin/env python

"""
A custom Mark and mark generator to create Toytree drawings in toyplot.
"""
import numpy as np
import xml.etree.ElementTree as xml
import toyplot
from toyplot.mark import Mark
from toyplot.html import _draw_bar, _draw_triangle, _draw_circle, _draw_rect
from .TreeStyle import COLORS1
# from toytree.utils import ToytreeError

# Register multipledispatch to share with toyplot.html
import functools
from multipledispatch import dispatch
dispatch = functools.partial(dispatch, namespace=toyplot.html._namespace)

"""
- fixed-order extension to tip positions for missing labels..?
- rawtree consensus checking...
- container tree to Mark
"""


PATH_FORMAT = {
    'c': "M {px:.1f} {py:.1f} L {cx:.1f} {cy:.1f}",
    'b1': "M {px:.1f} {py:.1f} C {px:.1f} {cy:.1f}, {px:.1f} {cy:.1f}, {cx:.1f} {cy:.3f}",
    'b2': "M {px:.1f} {py:.1f} C {cx:.1f} {py:.1f}, {cx:.1f} {py:.1f}, {cx:.1f} {cy:.3f}",    
    'p1': "M {px:.1f} {py:.1f} L {px:.1f} {cy:.1f} L {cx:.1f} {cy:.1f}",
    'p2': "M {px:.1f} {py:.1f} L {cx:.1f} {py:.1f} L {cx:.1f} {cy:.1f}",
    'pc': "M {cx:.1f} {cy:.1f} L {dx:.1f} {dy:.1f} A {rr:.1f} {rr:.1f} 0 0 {flag} {px:.1f} {py:.1f}",
}


class ToytreeMark(Mark):
    """
    Custom mark testing.
    """
    def __init__(
{'fraction_non_alphanumeric': 0.20279206465833946, 'fraction_numerical': 0.034533431300514325, 'mean_word_length': 3.6152542372881356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3780822', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1111, 'n_words': 313}