code: def addRelation(sourceSynset,relationName,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
docs: Adds relation with name <relationName> to
      <targetSynset>.