code: def NewEvent(
      type: str, id: UUID = None, data: JsonDict = None, metadata: JsonDict = None
  ) -> NewEventData:
      
  
      return NewEventData(id or uuid4(), type, data, metadata)
docs: Build the data structure for a new event.
  
      Args:
          type: An event type.
          id: The uuid identifier for the event.
          data: A dict containing data for the event. These data
              must be json serializable.
          metadata: A dict containing metadata about the event.
              These must be json serializable.