def addRelation(sourceSynset,relationName,targetSynset):
    """
    Adds relation with name <relationName> to
    <targetSynset>.

    """
    if not isinstance(sourceSynset, Synset):
        raise TypeError("sourceSynset not Synset instance")
    elif not isinstance(targetSynset, Synset):
        raise TypeError("targetSynset not Synset instance")
    elif relationName not in RELATION_NAMES:
        raise TypeError("relationName not in RELATION_NAMES")
    else:
        sourceSynset.addRelation(
            Relation(relationName,targetSynset)
            )
        return sourceSynset
Adds relation with name <relationName> to
    <targetSynset>.