pub fn generate_metadata(doc: &Document, names: &Names) -> TokenStream