def to_dot(self):
        if self.right_cardinality == self.left_cardinality == '':
            return ''
        cards = []
        if self.left_cardinality != '':
            cards.append('tail' +
                         self.graphviz_cardinalities(self.left_cardinality))
        if self.right_cardinality != '':
            cards.append('head' +
                         self.graphviz_cardinalities(self.right_cardinality))
        return '"{}" -- "{}" [{}];'.format(self.left_col, self.right_col, ','.join(cards))
dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/models.py/Relation.to_dot/original