def METHOD_NAME(sensor: SensorConfig,
                               location: LocationSeries,
                               start_date: date,
                               end_date: date) -> Tuple[LocationSeries, list]:
    """
    Query Epidata API for historical sensorization data.
    Will only return values if they are not null. If any days are null or are not available,
    they will be listed as missing.
    Parameters
    ----------
    sensor
        SensorConfig specifying which sensor to retrieve.
    location
        LocationSeries for the location to get.
    start_date
        First day to retrieve (inclusive).
    end_date
        Last day to retrieve (inclusive).
    Returns
    -------
        Tuple of (LocationSeries containing non-na data, list of dates without valid data). If no
        data was found, an empty LocationSeries is returned.
    """
    response = Epidata.covidcast_nowcast(
        data_source=sensor.source,
        signals=sensor.signal,
        time_type="day",
        geo_type=location.geo_type,
        time_values=Epidata.range(start_date.strftime("%Y%m%d"), end_date.strftime("%Y%m%d")),
        geo_value=location.geo_value,
        sensor_names=sensor.name,
        lag=sensor.lag)
    all_dates = [i.date() for i in date_range(start_date, end_date)]
    if response["result"] == 1:
        location.data = {datetime.strptime(str(i["time_value"]), "%Y%m%d").date(): i["value"]
                         for i in response.get("epidata", []) if not isnan(i["value"])}
        missing_dates = [i for i in all_dates if i not in location.dates]
        return location, missing_dates
    if response["result"] == -2:  # no results
        print("No historical results found")
        return location, all_dates
    raise Exception(f"Bad result from Epidata: {response['message']}")