def check_orientation(orientation):
    if (orientation is None):
        orientation = TOP
    else:
        orientation = orientation.lower()
        orientations = [LEFT, RIGHT, TOP, BOTTOM]
        if (orientation not in orientations):
            raise ValueError('Unknown orientiation: choose from {}'.format(orientations))
    return orientation
def check_orientation(orientation):
    if (orientation is None):
        orientation = TOP
    else:
        orientation = orientation.lower()
        orientations = [LEFT, RIGHT, TOP, BOTTOM]
        if (orientation not in orientations):
            raise ValueError('Unknown orientiation: choose from {}'.format(orientations))
    return orientation