'Close a binary relation in the ``Concept``\'s extension set.
:return: a new extension for the ``Concept`` in which the
relation is closed under a given property'

def close(self):

    from nltk.sem import is_rel
    assert is_rel(self._extension)
    if (u'symmetric' in self.closures):
        pairs = []
        for (x, y) in self._extension:
            pairs.append((y, x))
        sym = set(pairs)
        self._extension = self._extension.union(sym)
    if (u'transitive' in self.closures):
        all = self._make_graph(self._extension)
        closed = self._transclose(all)
        trans = self._make_pairs(closed)
        self._extension = self._extension.union(trans)
    self.extension = sorted(list(self._extension))
