def multiplex_hand_state(state, paint_value):
    """
    Paint hand state into the depth image.
    :param state:           Tuple of depth and hand state.
    :param paint_value:     Depth value to use for multiplexing.
    :return:                New depth image.
    """

    depth = state[0]
    hand_state = state[1]

    if hand_state > 0:
        depth[:4, :4] = paint_value

    return depth