<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def angle_to_distance(angle, units='metric'):
 """Convert angle in to distance along a great circle. Args: angle (float):
 Angle in degrees to convert to distance units (str):
 Unit type to be used for distances Returns: float: Distance in ``units`` Raises: ValueError: Unknown value for ``units`` """

    distance = math.radians(angle) * BODY_RADIUS

    if units in ('km', 'metric'):
        return distance
    elif units in ('sm', 'imperial', 'US customary'):
        return distance / STATUTE_MILE
    elif units in ('nm', 'nautical'):
        return distance / NAUTICAL_MILE
    else:
        raise ValueError('Unknown units type %r' % units)