class_docstr: The Region Adjacency Graph (RAG) of an image, subclasses :obj:`networkx.Graph`.
  
  Parameters
  ----------
  label_image : array of int
      An initial segmentation, with each region labeled as a different
      integer. Every unique value in ``label_image`` will correspond to
      a node in the graph.
  connectivity : int in {1, ..., ``label_image.ndim``}, optional
      The connectivity between pixels in ``label_image``. For a 2D image,
      a connectivity of 1 corresponds to immediate neighbors up, down,
      left, and right, while a connectivity of 2 also includes diagonal
      neighbors. See :func:`scipy.ndimage.generate_binary_structure`.
  data : :obj:`networkx.Graph` specification, optional
      Initial or additional edges to pass to :obj:`networkx.Graph`
      constructor. Valid edge specifications include edge list (list of tuples),
      NumPy arrays, and SciPy sparse matrices.
  **attr : keyword arguments, optional
      Additional attributes to add to the graph.
docstr: Add an edge between `u` and `v` while updating max node id.
  
  .. seealso:: :obj:`networkx.Graph.add_edge`.
docstr_tok: ["Add","an","edge","between","`","u","`","and","`","v","`","while","updating","max","node","id",".","..","seealso",":",":",":","obj",":","`","networkx.Graph.add_edge","`","."]
code: def add_edge(self, u, v, attr_dict=None, **attr):
      """Add an edge between `u` and `v` while updating max node id.
  
      .. seealso:: :obj:`networkx.Graph.add_edge`."""
      if attr_dict is None:  # compatibility with old networkx
          attr_dict = attr
      else:
          attr_dict.update(attr)
      super().add_edge(u, v, **attr_dict)
      self.max_id = max(u, v, self.max_id)
  
imports: import networkx
  import numpy
  from scipy import ndimage
  from scipy import sparse
  import math
  from ..None import measure, segmentation, util, color
  from .._shared.version_requirements import require
label_desc: Use image node_id 4 for calling the RAG obj's underlying member method code with example usage: obj.add_edge(u, v, attr_dict) without return types