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