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: Find the shortest path to traverse all points. This code was
  partially adapted from https://github.com/GXYM/DRRG licensed under the
  MIT license.
  
  Args:
      points(List[list[int]]): The point sequence
          [[x0, y0], [x1, y1], ...].
  
  Returns:
      List[list[int]]: The shortest index path.
docstr_tok: ["Find","the","shortest","path","to","traverse","all","points",".","This","code","was","partially","adapted","from","https",":","\/\/github.com\/GXYM\/DRRG","licensed","under","the","MIT","license",".","Args",":","points","(","List","[","list","[","int","]","]",")",":","The","point","sequence","[","[","x0",",","y0","]",",","[","x1",",","y1","]",",","...","]",".","Returns",":","List","[","list","[","int","]","]",":","The","shortest","index","path","."]
code: def _min_connect_path(
      self, points: List[List[int]]
  ) -> List[List[int]]:
      """Find the shortest path to traverse all points. This code was
      partially adapted from https://github.com/GXYM/DRRG licensed under the
      MIT license.
  
      Args:
          points(List[list[int]]): The point sequence
              [[x0, y0], [x1, y1], ...].
  
      Returns:
          List[list[int]]: The shortest index path.
      """
      assert isinstance(points, list)
      assert all([isinstance(point, list) for point in points])
      assert all(
          [
              isinstance(coord, int)
              for point in points
              for coord in point
          ]
      )
  
      points_queue = points.copy()
      shortest_path = []
      current_edge = [[], []]
  
      edge_dict0 = {}
      edge_dict1 = {}
      current_edge[0] = points_queue[0]
      current_edge[1] = points_queue[0]
      points_queue.remove(points_queue[0])
      while points_queue:
          for point in points_queue:
              length0 = self._norm2(point, current_edge[0])
              edge_dict0[length0] = [point, current_edge[0]]
              length1 = self._norm2(current_edge[1], point)
              edge_dict1[length1] = [current_edge[1], point]
          key0 = min(edge_dict0.keys())
          key1 = min(edge_dict1.keys())
  
          if key0 <= key1:
              start = edge_dict0[key0][0]
              end = edge_dict0[key0][1]
              shortest_path.insert(
                  0, [points.index(start), points.index(end)]
              )
              points_queue.remove(start)
              current_edge[0] = start
          else:
              start = edge_dict1[key1][0]
              end = edge_dict1[key1][1]
              shortest_path.append(
                  [points.index(start), points.index(end)]
              )
              points_queue.remove(end)
              current_edge[1] = end
  
          edge_dict0 = {}
          edge_dict1 = {}
  
      shortest_path = functools.reduce(operator.concat, shortest_path)
      shortest_path = sorted(
          set(shortest_path), key=shortest_path.index
      )
  
      return shortest_path
  
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 10 for calling the DRRGPostprocessor obj's underlying member method code with example usage: obj._min_connect_path(points) and returns: shortest_path