<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_dms(angle, style='dms'):
 """Convert decimal angle to degrees, minutes and possibly seconds. Args: angle (float):
 Angle to convert style (str):
 Return fractional or whole minutes values Returns: tuple of int: Angle converted to degrees, minutes and possibly seconds Raises: ValueError: Unknown value for ``style`` """

    sign = 1 if angle >= 0 else -1
    angle = abs(angle) * 3600
    minutes, seconds = divmod(angle, 60)
    degrees, minutes = divmod(minutes, 60)
    if style == 'dms':
        return tuple(sign * abs(i) for i in (int(degrees), int(minutes),
                                             seconds))
    elif style == 'dm':
        return tuple(sign * abs(i) for i in (int(degrees),
                                             (minutes + seconds / 60)))
    else:
        raise ValueError('Unknown style type %r' % style)