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: codegen.rs
    path of file: ./repos/graphql-client/graphql_client_codegen/src
    
    the code of the file until where you have to start completion: mod enums;
mod inputs;
mod selection;
mod shared;

use crate::{
    query::*,
    schema::{InputId, TypeId},
    type_qualifiers::GraphqlTypeQualifier,
    GeneralError, GraphQLClientCodegenOptions,
};
use heck::ToSnakeCase;
use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;
use selection::*;
use std::collections::BTreeMap;

/// The main code generation function.
pub(crate) fn response_for_query(
    operation_id: OperationId,
    options: &GraphQLClientCodegenOptions,
    query: BoundQuery<'_>,
) -> Result<TokenStream, GeneralError> {
    let all_used_types = all_used_types(operation_id, &query);
    let response_derives = render_derives(options.all_response_derives());
    let variable_derives = render_derives(options.all_variable_derives());

    let scalar_definitions = generate_scalar_definitions(&all_used_types, options, query);
    let enum_definitions = enums::generate_enum_definitions(&all_used_types, options, query);
    let fragment_definitions =
        generate_fragment_definitions(&all_used_types, &response_derives, options, &query);
    let input_object_definitions = inputs::generate_input_object_definitions(
        &all_used_types,
        options,
        &variable_derives,
        &query,
    );

    let variables_struct =
        generate_variables_struct(operation_id, &variable_derives, options, &query);

    let definitions =
      
    
fn decorate_type(ident: &Ident, qualifiers: &[GraphqlTypeQualifier]) -> TokenStream {
    let mut qualified = quote!(#ident);

    let mut non_null = false;

    // Note: we iterate over qualifiers in reverse because it is more intuitive. This
    // means we start from the _inner_ type and make our way to the outside.
    for qualifier in qualifiers.iter().rev() {
        match (non_null, qualifier) {
            // We are in non-null context, and we wrap the non-null type into a list.
            // We switch back to null context.
            (true, GraphqlTypeQualifier::List) => {
                qualified = quote!(Vec<#qualified>);
                non_null = false;
            }
            // We are in nullable context, and we wrap the nullable type into a list.
            (false, GraphqlTypeQualifier::List) => {
                qualified = quote!(Vec<Option<#qualified>>);
            }
            // We are in non-nullable context, but we can't double require a type
            // (!!).
            (true, GraphqlTypeQualifier::Required) => panic!("double required annotation"),
            // We are in nullable context, and we switch to non-nullable context.
            (false, GraphqlTypeQualifier::Required) => {
                non_null = true;
            }
        }
    }

    // If we are in nullable context at the end of the iteration, we wrap the whole
    // type with an Option.
    if !non_null {
        qualified = quote!(Option<#qualified>);
    }

    qualified
}