def coords_from_query(query):
    """Transform a query line into a (lng, lat) pair of coordinates."""
    try:
        coords = json.loads(query)
    except __HOLE__:
        vals = re.split(r"\,*\s*", query.strip())
        coords = [float(v) for v in vals]
    return tuple(coords[:2])
dataset/ETHPy150Open mapbox/mapbox-cli-py/mapboxcli/scripts/geocoding.py/coords_from_query