code: def _group_by_label(nodes: Iterable[Node]) -> List[List[Node]]:
      result = {}
      for node in nodes:
          label = node.operation.parameters["label"]
          if label not in result:
              result[label] = []
          result[label].append(node)
      return list(result.values())
  
imports: from __future__ import annotations
  from typing import Any, List, Tuple, Dict, Iterable, cast
  from nni.mutable import MutableExpression, Categorical, frozen_context, label_scope
  from nni.nas.space import Graph, GraphModelSpace, Node, StationaryMutator, Mutator
  from nni.nas.space.graph_op import Cell
label_desc: Use image node_id 3 for calling a global function with example usage: _group_by_label(nodes) and returns: list