You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/prisma-engines/query-engine/core/src/query_graph_builder/read/aggregations
    
    the code of the file until where you have to start completion: mod aggregate;
mod group_by;

pub(crate) use aggregate::*;
pub(crate) use group_by::*;

use 
    
fn collect_selection_tree(fields: &[FieldPair<'_>]) -> Vec<(String, Option<Vec<String>>)> {
    fields
        .iter()
        .map(|field| {
            let field = &field.parsed_field;
            (
                field.name.clone(),
                field.nested_fields.as_ref().and_then(|nested_object| {
                    let nested: Vec<_> = nested_object
                        .fields
                        .iter()
                        .map(|f| f.parsed_field.name.clone())
                        .collect();

                    if nested.is_empty() {
                        None
                    } else {
                        Some(nested)
                    }
                }),
            )
        })
        .collect()
}