def get_nodes(self, node_type="<STR_LIT>"):
tmp_nodes = self.diagram_graph.nodes(True)<EOL>if node_type == "<STR_LIT>":<EOL><INDENT>return tmp_nodes<EOL><DEDENT>else:<EOL><INDENT>nodes = []<EOL>for node in tmp_nodes:<EOL><INDENT>if node[<NUM_LIT:1>][consts.Consts.type] == node_type:<EOL><INDENT>nodes.append(node)<EOL><DEDENT><DEDENT>return nodes<EOL><DEDENT>
Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned.
Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes.

:param node_type: string with valid BPMN XML tag name (e.g. 'task', 'sequenceFlow').