def process_row(row, x, y, roi, end_type, parent_id=-1):
    """
    Convert each row into a line shape.
    Add the identifier of the parent shape if applicable.
    """
    frame = int(row[0])
    top = int(row[1]) + y
    bottom = int(row[2]) + y
    # Create the line
    line = LineI()
    line.x1 = rdouble(x)
    line.x2 = rdouble(x)
    line.y1 = rdouble(top)
    line.y2 = rdouble(bottom)
    line.theT = rint(frame)
    name = end_type
    if parent_id > -1:
        name += ", come from shapeID:%s" % parent_id
    line.textValue = rstring(name)
    # Use yellow
    line.strokeColor = rint(
        int.from_bytes([255, 0, 0, 255], byteorder='big', signed=True))
    roi.addShape(line)
    return frame