def normalize_query_result(result, sort=True):
    """
    Post-process query result to generate a simple, nested list.

    :param result: A QueryResult object.
    :param sort: if True (default) rows will be sorted.
    :return: A list of lists of RDF values.
    """
    normalized = [[row[i] for i in range(len(row))] for row in result]
    return sorted(normalized) if sort else normalized