def METHOD_NAME(client, query, field):
    batch = list(client.query(query))
    if 0 == len(batch):
        raise ValueError('There is no results for query: {!r}'.format(query))
    if 1 < len(batch):
        raise ValueError(
            'There is multiple ({} entries) results for query: {!r}'.format(
                len(batch), query))
    entry = batch[0]
    return getattr(entry, field)