returns a pair of trees:
        the first is that is a pruned version of tree_proxy created by pruning
            any leaf that has no ott_id and every internal that does not have
            any descendant with an ott_id. Nodes of out-degree 1 are suppressed
            as part of the TreeWithPathsInEdges-style.
        the second is the OTT induced tree for these ott_ids

def create_pruned_and_taxonomy_for_tip_ott_ids(tree_proxy, ott, create_monotypic_nodes=False):
    """returns a pair of trees:
        the first is that is a pruned version of tree_proxy created by pruning
            any leaf that has no ott_id and every internal that does not have
            any descendant with an ott_id. Nodes of out-degree 1 are suppressed
            as part of the TreeWithPathsInEdges-style.
        the second is the OTT induced tree for these ott_ids
    """
    # create and id2par that has ott IDs only at the tips (we are
    #   ignoring mappings at internal nodes.
    # OTT IDs are integers, and the nodeIDs are strings - so we should not get clashes.
    # TODO consider prefix scheme
    ott_ids = []
    ott_id_2_otu_par = {}
    for node in tree_proxy:
        if node.is_leaf:
            ott_id = node.ott_id
            if ott_id is not None:
                ott_ids.append(ott_id)
                assert isinstance(ott_id, int)
                parent_id = node.parent._id
                ott_id_2_otu_par[ott_id] = parent_id
        else:
            assert is_str_type(node._id)
            edge = node.edge
            if edge is not None:
                parent_id = node.parent._id
                ott_id_2_otu_par[node._id] = parent_id
            else:
                ott_id_2_otu_par[node._id] = None
    pruned_phylo = create_tree_from_id2par(ott_id_2_otu_par, ott_ids, create_monotypic_nodes=create_monotypic_nodes)
    taxo_tree = ott.induced_tree(ott_ids)
    return pruned_phylo, taxo_tree