code: def bench(pred, gt, y_samples, running_time):
      if any(len(p) != len(y_samples) for p in pred):
          raise Exception("Format of lanes error.")
      if running_time > 200 or len(gt) + 2 < len(pred):
          return 0.0, 0.0, 1.0
      angles = [
          LaneEval.get_angle(np.array(x_gts), np.array(y_samples))
          for x_gts in gt
      ]
      threshs = [
          LaneEval.pixel_thresh / np.cos(angle) for angle in angles
      ]
      line_accs = []
      fp, fn = 0.0, 0.0
      matched = 0.0
      for x_gts, thresh in zip(gt, threshs):
          accs = [
              LaneEval.line_accuracy(
                  np.array(x_preds), np.array(x_gts), thresh
              )
              for x_preds in pred
          ]
          max_acc = np.max(accs) if len(accs) > 0 else 0.0
          if max_acc < LaneEval.pt_thresh:
              fn += 1
          else:
              matched += 1
          line_accs.append(max_acc)
      fp = len(pred) - matched
      if len(gt) > 4 and fn > 0:
          fn -= 1
      s = sum(line_accs)
      if len(gt) > 4:
          s -= min(line_accs)
      return (
          s / max(min(4.0, len(gt)), 1.0),
          fp / len(pred) if len(pred) > 0 else 0.0,
          fn / max(min(len(gt), 4.0), 1.0),
      )
  
file_path: PaddleSeg/contrib/LaneSeg/third_party/lane.py
imports: import json
  import numpy
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 3 for calling the LaneEval obj's underlying member method code with example usage: obj.bench(pred, gt, y_samples, running_time) and returns: unknown,  unknown,  unknown, int,  int,  int