<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register(self, *args, **kwargs):
 """ Register a crud. Two unordered arguments are accepted, at least one should be passed: - a model, - a crudbuilder class """


        assert len(args) <= 2, 'register takes at most 2 args'
        assert len(args) > 0, 'register takes at least 1 arg'

        model, crudbuilder = self.__class__.extract_args(*args)

        if not issubclass(model, models.Model):
            msg = "First argument should be Django Model"
            raise NotModelException(msg)

        key = self._model_key(model, crudbuilder)

        if key in self:
            msg = "Key '{key}' has already been registered.".format(
                key=key
            )
            raise AlreadyRegistered(msg)

        self.__setitem__(key, crudbuilder)
        return crudbuilder