def summary_to_record(paths, summary):
    """Turn summary results into a record.

    paths: a list of column paths, where column paths are tuples
    of strings specifying the path to each column.
    summary: the model's summary produced by run_analyses."""

    record_list = []
    for path in paths:
        val = summary
        for path_part in path:
            if path_part in val:
                val = val[path_part]
            else:
                val = None
                break
        record_list.append(val)
    return tuple(record_list)