code: def angle_to_distance(angle, units='metric'):
      
      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)
docs: 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``