Get a metaclass configured to use this registry.

def metaclass(self):
        """Get a metaclass configured to use this registry."""
        if '_metaclass' not in self.__dict__:
            self._metaclass = type('PermissionsMeta', (PermissionsMeta,), {'registry': self})
        return self._metaclass