def subsets(self, nid, contract=True):
        """
        Retrieves subset ids for a class or ontology object
        """
        n = self.node(nid)
        subsets = []
        meta = self._meta(nid)
        if 'subsets' in meta:
            subsets = meta['subsets']
        else:
            subsets = []
        if contract:
            subsets = [self._contract_subset(s) for s in subsets]
        return subsets
Retrieves subset ids for a class or ontology object