<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _read( filename=None, data=None, schema=None, add_node_labels=True, use_uids=True ):
 """Read a phylogenetic tree into a phylopandas.DataFrame. The resulting DataFrame has the following columns: - name: label for each taxa or node. - id: unique id (created by phylopandas) given to each node. - type: type of node (leaf, internal, or root). - parent: parent id. necessary for constructing trees. - length: length of branch from parent to node. - distance: distance from root. Parameters filename: str (default is None) newick file to read into DataFrame. data: str (default is None) newick string to parse and read into DataFrame. add_node_labels: bool If true, labels the internal nodes with numbers. Returns ------- df: phylopandas.DataFrame. """

    if filename is not None:
        # Use Dendropy to parse tree.
        tree = dendropy.Tree.get(
            path=filename,
            schema=schema,
            preserve_underscores=True)
    elif data is not None:
        tree = dendropy.Tree.get(
            data=data,
            schema=schema,
            preserve_underscores=True)
    else:
        raise Exception('No tree given?')

    df = _dendropy_to_dataframe(
        tree, 
        add_node_labels=add_node_labels,
        use_uids=use_uids
    )
    return df