def METHOD_NAME(parts, max_vertex, max_length, max_brush_width, h, w, max_angle=360):
    mask = np.zeros((h, w, 1), dtype=np.float32)
    for _ in range(parts):
        num_strokes = np.random.randint(max_vertex)
        start_y = np.random.randint(h)
        start_x = np.random.randint(w)
        for i in range(num_strokes):
            angle = np.random.random() * np.deg2rad(max_angle)
            if i % 2 == 0:
                angle = 2 * np.pi - angle
            length = np.random.randint(max_length + 1)
            brush_width = np.random.randint(10, max_brush_width + 1) // 2 * 2
            next_y = start_y + length * np.cos(angle)
            next_x = start_x + length * np.sin(angle)
            next_y = np.clip(next_y, 0, h - 1).astype(np.int32)
            next_x = np.clip(next_x, 0, w - 1).astype(np.int32)
            cv2.line(mask, (start_y, start_x), (next_y, next_x), 1, brush_width)
            cv2.circle(mask, (start_y, start_x), brush_width // 2, 1)
            start_y, start_x = next_y, next_x
    return mask