def set_lane_color(label: Label, category_id: int) -> NDArrayU8:
    """Set the color for the lane given its attributes and category."""
    attributes = label.attributes
    if attributes is None:
        lane_direction, lane_style = 0, 0
    else:
        lane_direction = LANE_DIRECTION_MAP[str(
            attributes.get("laneDirection", "parallel"))]
        lane_style = LANE_STYLE_MAP[str(attributes.get("laneStyle", "solid"))]

    #value = category_id + (lane_direction << 5) + (lane_style << 4)
    value = category_id
    if lane_style == 0 and (category_id == 3 or category_id == 2):
        value = 1
    if lane_style == 0:
        value = 2
    else:
        value = 3

    color: NDArrayU8 = np.array([value], dtype=np.uint8)
    return color
Set the color for the lane given its attributes and category.
deploy/pipeline/tools/lane_to_mask.py