code: def is_relation_inverted(self, relation):
          
          return (
              relation in self._deinversions or
              (relation.endswith('-of') and relation not in self._inversions)
          )
docs: Return True if *relation* is inverted.