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: recipe.rs
    path of file: ./repos/cursive/cursive-macros/src/builder
    
    the code of the file until where you have to start completion: use proc_macro::TokenStream;
use proc_macro2::Span;
use quote::quote;

use std::collections::HashSet;

fn is_single_generic<'a>(path: &'a syn::Path, name: &str) -> Option<&'a syn::Type> {
    if path.segments.len() != 1 {
        return None;
    }

    let segment = &path.segments[0];

    if segment.ident != name {
        r
    
fn base_default_name(expr: &syn::Expr) -> Option<String> {
    // From `TextView::new(content)`, return `TextView`.
    // If the expression is not such a method call, bail.
    let func = match expr {
        syn::Expr::Call(syn::ExprCall { func, .. }) => func,
        _ => return None,
    };

    let path = match &**func {
        syn::Expr::Path(syn::ExprPath { path, .. }) => path,
        _ => return None,
    };

    let struct_name_id = path.segments.len().checked_sub(2)?;
    let ident = &path.segments[struct_name_id].ident;
    Some(ident.to_string())
}