Get keys for a given metakey

def uniquekeys(self, metakey=None):
        """
        Get keys for a given metakey
        """
        if metakey is None:
            return self._uniquekeys
        else:
            if metakey not in self.metakeys():
                raise ValueError('metakey %s does not exist' % metakey)
            return self._uniquekeys[metakey]