'Toggle the display of the relations for the given synset and
relation type.
This function will throw a KeyError if the synset is currently
not being displayed.'

def toggle_synset_relation(self, synset, relation):

    if (relation in self.synset_relations[synset.name()]):
        self.synset_relations[synset.name()].remove(relation)
    else:
        self.synset_relations[synset.name()].add(relation)
    return self
