code: def cal_curve_length(self, line):
      assert line.ndim == 2
      assert len(line) >= 2
  
      edges_length = np.sqrt(
          (line[1:, 0] - line[:-1, 0]) ** 2
          + (line[1:, 1] - line[:-1, 1]) ** 2
      )
      total_length = np.sum(edges_length)
      return edges_length, total_length
  
imports: import cv2
  import numpy
  from ppocr.utils.utility import check_install
  from numpy.linalg import norm
label_desc: Use image node_id 8 for calling the DRRGTargets obj's underlying member method code with example usage: obj.cal_curve_length(line) and returns: edges_length,  total_length