code: def get_nodes(self, node_type=""):
          
          tmp_nodes = self.diagram_graph.nodes(True)
          if node_type == "":
              return tmp_nodes
          else:
              nodes = []
              for node in tmp_nodes:
                  if node[1][consts.Consts.type] == node_type:
                      nodes.append(node)
              return nodes
docs: 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').