def delete(self, fromuser, *args, **kwargs):
        from modoboa.lib.permissions import \
            get_object_owner, grant_access_to_object, ungrant_access_to_object

        if fromuser == self:
            raise PermDeniedException(
                _("You can't delete your own account")
            )

        if not fromuser.can_access(self):
            raise PermDeniedException

        owner = get_object_owner(self)
        for ooentry in self.objectaccess_set.filter(is_owner=True):
            if ooentry.content_object is not None:
                grant_access_to_object(owner, ooentry.content_object, True)
                ungrant_access_to_object(ooentry.content_object, self)

        events.raiseEvent("AccountDeleted", self, fromuser, **kwargs)
        ungrant_access_to_object(self)
        super(User, self).delete()
Load the --module parameter
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/models.py/User.delete--crossover with--dataset/ETHPy150Open spotify/luigi/luigi/cmdline_parser.py/CmdlineParser._attempt_load_module