def validate_latlon_pair(value):
    """
    Check to make sure value is a tuple or list of length 2,
    where the first element is a longitude and the second.
    is a latitude.
    """
    if len(value) != 2:
        raise ValueError(
            'List inputs are assumed to be coordinate pairs. This list has more than two elements.'
            )
    if not -180.0 <= value[0] <= 180.0:
        raise ValueError(' '.join([
            'The first element of the list is assumed to be longitude (x-coordinates),'
            , 'but this element is outside acceptable bounds (-180.0, 180.0)'])
            )
    if not -90.0 <= value[0] <= 90.0:
        raise ValueError(' '.join([
            'The second element of the list is assumed to be latitude (y-coordinates),'
            , 'but this element is outside acceptable bounds (-90.0, 90.0)']))
    return True
