<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_rotation(rotation):
 """checks rotation parameter if illegal value raises exception"""


    if rotation not in ALLOWED_ROTATION:
        allowed_rotation = ', '.join(ALLOWED_ROTATION)
        raise UnsupportedRotation('Rotation %s is not allwoed. Allowed are %s'
                                  % (rotation, allowed_rotation))