def reverse_coordinate_order(coords):
    """
    Takes a tuple of (lat, lng) or (lng, lat) coordinates and reverses their
    order.
    """
    if len(coords) != 2:
        raise ValueError('coordinates must contain exactly 2 points')
    return (coords[1], coords[0])