code: def strokes_to_lines(strokes):
      """Convert stroke-3 format to polyline format."""
      x = 0
      y = 0
      lines = []
      line = []
      for i in range(len(strokes)):
          if strokes[i, 2] == 1:
              x += float(strokes[i, 0])
              y += float(strokes[i, 1])
              line.append([x, y])
              lines.append(line)
              line = []
          else:
              x += float(strokes[i, 0])
              y += float(strokes[i, 1])
              line.append([x, y])
      return lines
  
imports: import random
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: strokes_to_lines(strokes) and returns: lines