<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def del_restriction(self, command, user, event_types):
 """ Removes restriction for given `command`. :param command: command on which the restriction should be removed. :type command: str :param user: username for which restriction should be removed. :type user: str :param event_types: types of events that should be removed from restriction. :type event_types: list """

        if user.lower() in self.commands_rights[command]:
            for event_type in event_types:
                try:
                    self.commands_rights[command][user.lower()].remove(event_type)
                except ValueError:
                    pass
            if not self.commands_rights[command][user.lower()]:
                self.commands_rights[command].pop(user.lower())