def draw_data_value_rect(cairo_context, color, value_size, name_size, pos, port_side):
    """This method draws the containing rect for the data port value, depending on the side and size of the label.

    :param cairo_context: Draw Context
    :param color: Background color of value part
    :param value_size: Size (width, height) of label holding the value
    :param name_size: Size (width, height) of label holding the name
    :param pos: Position of name label start point (upper left corner of label)
    :param port_side: Side on which the value part should be drawn
    :return: Rotation Angle (to rotate value accordingly), X-Position of value label start point, Y-Position
             of value label start point
    """
    c = cairo_context

    rot_angle = .0
    move_x = 0.
    move_y = 0.

    if port_side is SnappedSide.RIGHT:
        move_x = pos[0] + name_size[0]
        move_y = pos[1]

        c.rectangle(move_x, move_y, value_size[0], value_size[1])
    elif port_side is SnappedSide.BOTTOM:
        move_x = pos[0] - value_size[1]
        move_y = pos[1] + name_size[0]
        rot_angle = pi / 2.

        c.rectangle(move_x, move_y, value_size[1], value_size[0])
    elif port_side is SnappedSide.LEFT:
        move_x = pos[0] - value_size[0]
        move_y = pos[1]

        c.rectangle(move_x, move_y, value_size[0], value_size[1])
    elif port_side is SnappedSide.TOP:
        move_x = pos[0] - value_size[1]
        move_y = pos[1] - value_size[0]
        rot_angle = -pi / 2.

        c.rectangle(move_x, move_y, value_size[1], value_size[0])

    c.set_source_rgba(*color)
    c.fill_preserve()
    c.set_source_rgb(*gui_config.gtk_colors['BLACK'].to_floats())
    c.stroke()

    return rot_angle, move_x, move_y
This method draws the containing rect for the data port value, depending on the side and size of the label.

    :param cairo_context: Draw Context
    :param color: Background color of value part
    :param value_size: Size (width, height) of label holding the value
    :param name_size: Size (width, height) of label holding the name
    :param pos: Position of name label start point (upper left corner of label)
    :param port_side: Side on which the value part should be drawn
    :return: Rotation Angle (to rotate value accordingly), X-Position of value label start point, Y-Position
             of value label start point