def get_coords(name, geo_coder):
    """
    Returns the coordinates of the `name` location using the geo_coder.
    """
    location = geo_coder(name + ', Canada')
    # Default to province if geocoding failed
    if location is None:
        print(f"WARNING: Failed to geocode {name}.")
        location = geo_coder(name.split(", ", 1)[1] + ', Canada')

    return location.latitude, location.longitude