def __new__(metaclass, class_name, class_parents, class_attributes):
        """
        Creates the class and connects it to the signal if so. Adds all
        default attributes and methods.
        """
        class_attributes['get_all'] = get_all
        new_class = super(SignalConnectMetaClass, metaclass).__new__(
            metaclass, class_name, class_parents, class_attributes)
        try:
            dispatch_uid = new_class.get_dispatch_uid()
        except AttributeError:
            raise NotImplementedError(class_name % 'Your class %s must have a get_dispatch_uid classmethod.')
        if dispatch_uid is not None:
            try:
                signal = new_class.signal
            except AttributeError:
                raise NotImplementedError('Your class %s must have a signal argument, which must be a Django Signal instance.' % class_name)
            else:
                signal.connect(new_class, dispatch_uid=dispatch_uid)
        attributes = {'check_permission': check_permission,
                      'get_default_weight': get_default_weight,
                      'default_weight': 0}
        for name, attribute in attributes.items():
            if not hasattr(new_class, name):
                setattr(new_class, name, attribute)
        return new_class
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/utils/dispatch.py/SignalConnectMetaClass.__new__/swapped operands of `%`