code: def imshow_lanes(img, lanes, show=False, out_file=None, width=4):
      lanes_xys = []
      for _, lane in enumerate(lanes):
          xys = []
          for x, y in lane:
              if x <= 0 or y <= 0:
                  continue
              x, y = int(x), int(y)
              xys.append((x, y))
          lanes_xys.append(xys)
      lanes_xys.sort(key=lambda xys: xys[0][0] if len(xys) > 0 else 0)
  
      for idx, xys in enumerate(lanes_xys):
          for i in range(1, len(xys)):
              cv2.line(
                  img, xys[i - 1], xys[i], COLORS[idx], thickness=width
              )
  
      if show:
          cv2.imshow("view", img)
          cv2.waitKey(0)
  
      if out_file:
          if not os.path.exists(os.path.dirname(out_file)):
              os.makedirs(os.path.dirname(out_file))
          cv2.imwrite(out_file, img)
  
file_path: PaddleDetection/ppdet/modeling/lane_utils.py
imports: import os
  import cv2
  import numpy
  from scipy.interpolate import InterpolatedUnivariateSpline
label_desc: Use image node_id 1 for calling a global function with example usage: imshow_lanes(img, lanes, show, out_file, width) without return types