code: def prepare_dispatches():
      
      dispatches = []
      target_messages = Message.get_without_dispatches()
  
      cache = {}
  
      for message_model in target_messages:
  
          if message_model.cls not in cache:
              message_cls = get_registered_message_type(message_model.cls)
              subscribers = message_cls.get_subscribers()
              cache[message_model.cls] = (message_cls, subscribers)
          else:
              message_cls, subscribers = cache[message_model.cls]
  
          dispatches.extend(message_cls.prepare_dispatches(message_model))
  
      return dispatches
docs: Automatically creates dispatches for messages without them.
  
      :return: list of Dispatch
      :rtype: list