def check_existing_filtered_location(timeseries, entry):
    """
    Returns true if there is an existing filtered_location.
    We check for this by querying the database for an existing entry with the same timestamp.
    Note that we cannot check for the write_ts because in case the stream is filtered on the client,
    the write_ts for the filtered location may be slightly different.
    """
    existing_duplicate = timeseries.get_entry_at_ts("background/filtered_location", "data.ts", entry.ts)
    if existing_duplicate is not None:
        return True
    else:
        return False