returns:
          - a list of recognized ott_ids.
          - a list of unrecognized ott_ids
          - a list of ott_ids that forward to unrecognized ott_ids
          - a list of ott_ids that do not appear in the tree because they are flagged to be pruned.
          - a list of ott_ids that do not appear in the tree because they are above the root of the relevant subtree.
          - a dict mapping input Id to forwarded Id
        The relative order will be the input order, but the unrecognized elements will
            be deleted.

def map_ott_ids(self, ott_id_list, to_prune_fsi_set, root_ott_id):
        """returns:
          - a list of recognized ott_ids.
          - a list of unrecognized ott_ids
          - a list of ott_ids that forward to unrecognized ott_ids
          - a list of ott_ids that do not appear in the tree because they are flagged to be pruned.
          - a list of ott_ids that do not appear in the tree because they are above the root of the relevant subtree.
          - a dict mapping input Id to forwarded Id
        The relative order will be the input order, but the unrecognized elements will
            be deleted.
        """
        mapped, unrecog, forward2unrecog, pruned, above_root, old2new = [], [], [], [], [], {}
        known_unpruned, known_pruned = set(), set()
        known_above_root, known_below_root = set(), set()
        oi2poi = self.ott_id2par_ott_id
        ft = self.forward_table
        for old_id in ott_id_list:
            if old_id in oi2poi:
                if self.check_if_above_root(old_id, known_above_root, known_below_root, root_ott_id):
                    above_root.append(old_id)
                elif (to_prune_fsi_set is not None) and \
                        self.check_if_in_pruned_subtree(old_id, known_unpruned, known_pruned, to_prune_fsi_set):
                    pruned.append(old_id)
                else:
                    mapped.append(old_id)
            else:
                new_id = ft.get(old_id)
                if new_id is None:
                    unrecog.append(old_id)
                else:
                    if new_id in oi2poi:
                        if (to_prune_fsi_set is not None) and \
                                self.check_if_in_pruned_subtree(new_id, known_unpruned, known_pruned, to_prune_fsi_set):
                            pruned.append(old_id)  # could be in a forward2pruned
                        else:
                            old2new[old_id] = new_id
                            mapped.append(new_id)
                    else:
                        forward2unrecog.append(old_id)
        return mapped, unrecog, forward2unrecog, pruned, above_root, old2new