- add parent node (if not there, yet) w/ segment type
        - add edge from parent node to current element

def __add_parent_relation(self, element, element_id, segment_type, parent_segment_type):
        """
        - add parent node (if not there, yet) w/ segment type
        - add edge from parent node to current element
        """
        relname = element.attrib['relname'] # name of RST relation or 'span'
        reltype = self.relations.get(relname, '') # 'span', 'multinuc' or ''

        parent_id = self.ns+':'+element.attrib['parent']

        if parent_segment_type:
            parent_attrs = {self.ns+':rel_name': relname,
                            self.ns+':segment_type': parent_segment_type}
        else: # e.g. if the parent is a root node of a multinuc, we don't
              # know what its segment type is
            parent_attrs = {self.ns+':rel_name': relname}

        if parent_id not in self:
            self.add_node(parent_id, layers={self.ns}, attr_dict=parent_attrs)
        else:
            if segment_type != 'span':
                self.node[parent_id].update(parent_attrs)

        if segment_type == 'span':
            edge_type = EdgeTypes.spanning_relation
        else:
            edge_type = EdgeTypes.dominance_relation

        rel_attrs = {self.ns+':rel_name': relname, self.ns+':rel_type': reltype,
                     'label': self.ns+':'+relname}
        self.add_edge(parent_id, element_id, layers={self.ns},
                      attr_dict=rel_attrs, edge_type=edge_type)