import math
import random


def random_coords(min_lat=-75, max_lat=75, min_lon=-180, max_lon=180):
    """
    Produces a random lat/lon pair within the given bounds.
    """
    lats_ok = -90 < min_lat <= max_lat < 90
    lons_ok = -180 <= min_lon <= max_lon <= 180
    assert lats_ok and lons_ok, "Bad coordinate bounds arguments"

    # Source: https://www.jasondavies.com/maps/random-points/
    min_x = 0.5 * (1 - math.sin(math.pi * min_lat / 180))
    max_x = 0.5 * (1 - math.sin(math.pi * max_lat / 180))
    lat = (180 / math.pi) * math.acos(2 * random.uniform(min_x, max_x) - 1) - 90
    lon = random.uniform(min_lon, max_lon)

    return (lat, lon)