def METHOD_NAME(self, item):
    match self.parser.parameters[2].upper():
        case "HAZARDOUS":
            if item.hazardous is None:
                item.hazardous = {}
            if len(self.parser.parameters) >= 4:
                item.hazardous[self._get_state_name()] = self.parser.parameters[3]
            else:
                item.hazardous[self._get_state_name()] = ""
        case "DISABLE_MESSAGES":
            if item.messages_disabled is None:
                item.messages_disabled = {}
            item.messages_disabled[self._get_state_name()] = True
        case _:
            raise self.parser.error(
                "HAZARDOUS or DISABLE_MESSAGES expected as third parameter for this line.",
                self.usage,
            )