@staticmethod<EOL><INDENT>def import_subprocess_to_graph(diagram_graph, sequence_flows, process_id, process_attributes, subprocess_element):<DEDENT>
BpmnDiagramGraphImport.import_activity_to_graph(diagram_graph, process_id, process_attributes,<EOL>subprocess_element)<EOL>subprocess_id = subprocess_element.getAttribute(consts.Consts.id)<EOL>diagram_graph.node[subprocess_id][consts.Consts.triggered_by_event] =subprocess_element.getAttribute(consts.Consts.triggered_by_event)if subprocess_element.hasAttribute(consts.Consts.triggered_by_event) else "<STR_LIT:false>"<EOL>subprocess_attributes = diagram_graph.node[subprocess_id]<EOL>subprocess_attributes[consts.Consts.node_ids] = []<EOL>for element in utils.BpmnImportUtils.iterate_elements(subprocess_element):<EOL><INDENT>if element.nodeType != element.TEXT_NODE:<EOL><INDENT>tag_name = utils.BpmnImportUtils.remove_namespace_from_tag_name(element.tagName)<EOL>BpmnDiagramGraphImport.__import_element_by_tag_name(diagram_graph, sequence_flows, subprocess_id,<EOL>subprocess_attributes, element, tag_name)<EOL><DEDENT><DEDENT>for flow in utils.BpmnImportUtils.iterate_elements(subprocess_element):<EOL><INDENT>if flow.nodeType != flow.TEXT_NODE:<EOL><INDENT>tag_name = utils.BpmnImportUtils.remove_namespace_from_tag_name(flow.tagName)<EOL>if tag_name == consts.Consts.sequence_flow:<EOL><INDENT>BpmnDiagramGraphImport.import_sequence_flow_to_graph(diagram_graph, sequence_flows, subprocess_id,<EOL>flow)<EOL><DEDENT><DEDENT><DEDENT>
Adds to graph the new element that represents BPMN subprocess.
In addition to attributes inherited from FlowNode type, SubProcess
has additional attribute tiggeredByEvent (boolean type, default value - false).

:param diagram_graph: NetworkX graph representing a BPMN process diagram,
:param sequence_flows: a list of sequence flows existing in 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 subprocess_element: object representing a BPMN XML 'subprocess' element