code: def check_rotation(rotation):
      
  
      if rotation not in ALLOWED_ROTATION:
          allowed_rotation = ', '.join(ALLOWED_ROTATION)
          raise UnsupportedRotation('Rotation %s is not allwoed. Allowed are %s'
                                    % (rotation, allowed_rotation))
docs: checks rotation parameter if illegal value raises exception