<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add_link(self, edge):
 """ Adds an edge to the ProbModelXML. """

        edge_data = self.data['probnet']['edges'][edge]
        if isinstance(edge, six.string_types):
            edge = eval(edge)
        link = etree.SubElement(self.links, 'Link', attrib={'var1': edge[0], 'var2': edge[1],
                                                            'directed': edge_data['directed']})
        try:
            etree.SubElement(link, 'Comment').text = edge_data['Comment']
        except KeyError:
            pass
        try:
            etree.SubElement(link, 'Label').text = edge_data['Label']
        except KeyError:
            pass
        try:
            self._add_additional_properties(link, edge_data['AdditionalProperties'])
        except KeyError:
            etree.SubElement(link, 'AdditionalProperties')