docs: def all(self, domain=None):
          """
          Gets the messages within a given domain.
  
          If domain is None, it returns all messages.
  
          @type id: The
          @param id: message id
  
          @rtype: dict
          @return: A dict of messages
          """
          if domain is None:
              return {k: dict(v) for k, v in list(self.messages.items())}
  
          return dict(self.messages.get(domain, {}))