class_docstr: Merge text components and construct boundaries of text instances.
  
  Args:
      link_thr (float): The edge score threshold. Defaults to 0.8.
      edge_len_thr (int or float): The edge length threshold. Defaults to 50.
      rescale_fields (list[str]): The bbox/polygon field names to
          be rescaled. If None, no rescaling will be performed. Defaults to
          [polygons'].
docstr: Conventional connected components searching. This code was partially
  adapted from https://github.com/GXYM/DRRG licensed under the MIT
  license.
  
  Args:
      nodes (list[Node]): The list of Node objects.
      score_dict (dict): The edge score dict.
  
  Returns:
      List[list[Node]]: The clustered Node objects.
docstr_tok: ["Conventional","connected","components","searching",".","This","code","was","partially","adapted","from","https",":","\/\/github.com\/GXYM\/DRRG","licensed","under","the","MIT","license",".","Args",":","nodes","(","list","[","Node","]",")",":","The","list","of","Node","objects",".","score_dict","(","dict",")",":","The","edge","score","dict",".","Returns",":","List","[","list","[","Node","]","]",":","The","clustered","Node","objects","."]
code: def _connected_components(
      self, nodes: List[Node], score_dict: Dict
  ) -> List[List[Node]]:
      """Conventional connected components searching. This code was partially
      adapted from https://github.com/GXYM/DRRG licensed under the MIT
      license.
  
      Args:
          nodes (list[Node]): The list of Node objects.
          score_dict (dict): The edge score dict.
  
      Returns:
          List[list[Node]]: The clustered Node objects.
      """
      assert isinstance(nodes, list)
      assert all([isinstance(node, Node) for node in nodes])
      assert isinstance(score_dict, dict)
  
      clusters = []
      nodes = set(nodes)
      while nodes:
          node = nodes.pop()
          cluster = {node}
          node_queue = [node]
          while node_queue:
              node = node_queue.pop(0)
              neighbors = {
                  neighbor
                  for neighbor in node.links
                  if score_dict[tuple(sorted([node.ind, neighbor.ind]))]
                  >= self.link_thr
              }
              neighbors.difference_update(cluster)
              nodes.difference_update(neighbors)
              cluster.update(neighbors)
              node_queue.extend(neighbors)
          clusters.append(list(cluster))
      return clusters
  
imports: import functools
  import operator
  from typing import Dict, List, Tuple, Union
  import cv2
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from numpy import ndarray
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
  from .base import BaseTextDetPostProcessor
label_desc: Use image node_id 5 for calling the DRRGPostprocessor obj's underlying member method code with example usage: obj._connected_components(nodes, score_dict) and returns: clusters