code: def message(self, message: Message, rule: Optional[int]) -> None:
          
          rule_id = self._rule_id(rule)
          if rule_id not in self.messages:
              self.messages[rule_id] = []
  
          if len(self.messages[rule_id]) < self._rule_message_cap:
              self.messages[rule_id].append(message)
docs: Add a message to the appropriate list of messages. If `rule` refers
          to a valid id range for a go rule, the message is entered in a list
          keyed by the full gorule-{id}. Otherwise, if `rule` is None, or
          outside the id range, then we put this in the catch-all "other"
          keyed list of messages.