<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def NewEvent( type: str, id: UUID = None, data: JsonDict = None, metadata: JsonDict = None ) -> NewEventData: """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. """


    return NewEventData(id or uuid4(), type, data, metadata)