code: def _label_all(rag, attr_name):
      """Assign a unique integer to the given attribute in the RAG.
  
      This function assumes that all labels in `rag` are unique. It
      picks up a random label from them and assigns it to the `attr_name`
      attribute of all the nodes.
  
      rag : RAG
          The Region Adjacency Graph.
      attr_name : string
          The attribute to which a unique integer is assigned.
      """
      node = min(rag.nodes())
      new_label = rag.nodes[node]["labels"][0]
      for n, d in rag.nodes(data=True):
          d[attr_name] = new_label
  
file_path: scikit-image/skimage/graph/_graph_cut.py
imports: import networkx
  import numpy
  from scipy.sparse import linalg
  from .None import _ncut, _ncut_cy
label_desc: Use image node_id 5 for calling a global function with example usage: _label_all(rag, attr_name) without return types