code: def connected_nodes(matrix):
      _, labels = connected_components(matrix)
  
      groups = []
  
      for tag in np.unique(labels):
          group = np.where(labels == tag)[0]
          groups.append(group)
  
      return groups
  
file_path: sentence-transformers/examples/applications/text-summarization/LexRank.py
imports: import numpy
  from scipy.sparse.csgraph import connected_components
  from scipy.special import softmax
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: connected_nodes(matrix) and returns: groups