src/newick.py
def dumps(trees):
    """
    Serialize a list of trees in Newick format.

    :param trees: List of Node objects or a single Node object.
    :return: Newick formatted string.
    """
    if isinstance(trees, Node):
        trees = [trees]
    return ';\n'.join([tree.newick for tree in trees]) + ';'
def dumps(trees):
    if isinstance(trees, Node):
        trees = [trees]
    return ';\n'.join([tree.newick for tree in trees]) + ';'
def dumps ( trees ) : if isinstance ( trees , Node ) : trees = [ trees ] return ';\n' . join ( [ tree . newick for tree in trees ] ) + ';'
Serialize a list of trees in Newick format.

    :param trees: List of Node objects or a single Node object.
    :return: Newick formatted string.
Serialize a list of trees in Newick format .