code: def import_end_event_to_graph(diagram_graph, process_id, process_attributes, element):
          
          end_event_definitions = {'messageEventDefinition', 'signalEventDefinition', 'escalationEventDefinition',
                                   'errorEventDefinition', 'compensateEventDefinition', 'terminateEventDefinition'}
          BpmnDiagramGraphImport.import_flow_node_to_graph(diagram_graph, process_id, process_attributes, element)
          BpmnDiagramGraphImport.import_event_definition_elements(diagram_graph, element, end_event_definitions)
docs: Adds to graph the new element that represents BPMN end event.
          End event inherits sequence of eventDefinitionRef from Event type.
          Separate methods for each event type are required since each of them has different variants
          (Message, Error, Signal etc.).
  
          :param diagram_graph: NetworkX graph representing a BPMN process diagram,
          :param process_id: string object, representing an ID of process element,
          :param process_attributes: dictionary that holds attribute values of 'process' element, which is parent of
              imported flow node,
          :param element: object representing a BPMN XML 'endEvent' element.