def worker(ndocs): global fake result = [] for _ in range(ndocs): uuid = str(uuid4()) coords = fake.local_latlng(country_code="US", coords_only=True) lat = round(float(coords[0]) + random.uniform(-1, 1), 5) # faker local_latlng generates duplicates. this is a workaround lng = round(float(coords[1]) + random.uniform(-1, 1), 5) point_lnglat = f'{lng} {lat}' point_wkt = Point(lng, lat).wkt dob = fake.date_of_birth(minimum_age=10, maximum_age=90).year result.append({"uuid": uuid, "point_lnglat": point_lnglat, "point_wkt": point_wkt, "dob": dob}) return result