<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def determine_rotation(rotation, mark):
 """ Determines the number of degrees to rotate the watermark image. """

    if isinstance(rotation, six.string_types) and rotation.lower() == 'r':
        rotation = random.randint(0, 359)
    else:
        rotation = _int(rotation)

    return rotation