def get_last_readings(client, name, time_from, time_to):
    """Returns values and timestamps of recent readings."""
    query = client.query(kind=name)
    query.add_filter("timestamp", ">=", time_from)
    query.add_filter("timestamp", "<=", time_to)
    query.order = ["timestamp"]

    parsed_results = []
    for entity in query.fetch():
        if "value" not in entity:
            continue
        if "timestamp" not in entity:
            continue
        parsed_results.append((entity["value"], entity["timestamp"]))
    return parsed_results