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: lib.rs
    path of file: ./repos/genshin_artifact/mona_derive/src
    
    the code of the file until where you have to start completion: extern crate proc_macro;
use proc_macro::TokenStream;

use syn::{parse_macro_input, DeriveInput};
use quote::quote;
use crate::utils::get_enum_variants;

mod utils;

#[proc_macro_derive(PotentialFunctionData)]
pub fn derive_potential_function_data(input: TokenStream) -> TokenStream {
    let ast = parse_macro_input!(input as DeriveInput);
    let mut vars = get_enum_variants(&ast);

    let mut rows_create = String::new();
    let mut rows_meta = String::new();
    let mut rows_config = String::new();

    for v in vars.iter() {
        rows_create.push_str(&format!("PotentialFunctionName::{n} => crate::potential_function::potential_functions::PotentialFunction{n}::create(config),\n", n=v));
        rows_meta.push_str(&format!("PotentialFunctionName::{n} => crate::potential_function::potential_functions::PotentialFunction{n}::META,\n", n=v));
        rows_config.push_str(&format!("PotentialFunctionName::{n} => crate::potential_function::potential_functions::PotentialFunction{n}::CONFIG,\n", n=v));
    }

    let output = format!(
        r#"
        use crate::potential_function::potential_function::{{PotentialFunction, PotentialFunctionMeta, PotentialFunctionMetaData}};
        use crate::potential_function::potential_function_config::PotentialFunctionConfig;
        use crate::common::item_config_type::ItemConfig;
        impl PotentialFunctionName {{
            pub fn create(&self, config: &PotentialFunctionConfig) -> Box<dyn PotentialFunction> {{
                match *self {{
                    {rows_create}
                }}
            }}

            #[cfg(not(target_family = "wasm"))]
            pub fn get_meta(&self) -> PotentialFunctionMetaData {{
                match *self {{
                    {rows_meta}
                }}
            }}

            #[cfg(not(target_family = "wasm"))]
            pub fn get_config(&self) -> Option<&'static [ItemConfig]> {{
                match *self {{
                    {rows_config}
                }}
            }}
        }}
        "#,
        rows_create=rows_create,
        rows_meta=rows_meta,
        rows_config=rows_config
    );

    output.parse().unwrap()
}

#[proc_macro_derive(TeamTargetFunctionData)]
pub fn derive_team_target_function_data(input: TokenStream) -> TokenStream {
    let ast = parse_macro_input!(input as DeriveInput);
    let mut vars = get_enum_variants(&ast);

    let mut rows_members = String::new();
    let mut rows_get_buff = String::new();
    let mut rows_create = String::new();
    let mut rows_get_meta = String::new();
    for v in vars.iter() {
        rows_members.push_str(&format!("TeamName::{n} => crate::team_target::team_targets::TeamTarget{n}::MEMBERS,\n", n=v));
        rows_get_buff.push_str(&format!("TeamName::{n} => crate::team_target::team_targets::TeamTarget{n}::get_default_buffs(team),\n", n=v));
        rows_create.push_str(&format!("TeamName::{n} => crate::team_target::team_targets::TeamTarget{n}::create(config, team),\n", n=v));
        rows_get_meta.push_str(&format!("TeamName::{n} => crate::team_target::team_targets::TeamTarget{n}::META,\n", n=v));
    }

    let output = format!(
        r#"
        use std::collections::Ha
    
pub fn derive_character_data(input: TokenStream) -> TokenStream {
    let ast = parse_macro_input!(input as DeriveInput);

    let mut vars = get_enum_variants(&ast);

    let mut rows_meta_data = String::new();
    let mut rows_effect = String::new();
    let mut rows_damage = String::new();
    let mut rows_tf = String::new();
    let mut rows_skill_map = String::new();
    let mut rows_config_data = String::new();
    let mut rows_config_skill = String::new();
    let mut rows_skill_len = String::new();
    let mut rows_skill_from_str = String::new();

    for v in vars.iter() {
        rows_meta_data.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::STATIC_DATA,\n", n=v));
        rows_effect.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::new_effect(common_data, config),\n", n=v));
        rows_damage.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::damage_internal::<D>(context, skill_index, skill_config, fumo),\n", n=v));
        rows_tf.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::get_target_function_by_role(role_index, team, character, weapon),\n", n=v));
        rows_skill_map.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::SKILL_MAP,\n", n=v));
        rows_config_data.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::CONFIG_DATA,\n", n=v));
        rows_config_skill.push_str(&format!("CharacterName::{n} => crate::character::characters::{n}::CONFIG_SKILL,\n", n=v));
        rows_skill_len.push_str(&format!("CharacterName::{n} => <crate::character::characters::{n} as CharacterTrait>::DamageEnumType::COUNT,\n", n=v));
        rows_skill_from_str.push_str(
            &format!("CharacterName::{n} => <crate::character::characters::{n} as CharacterTrait>::DamageEnumType::from_str(s).ok().map(|x| x as usize),\n", n=v)
        );
    }

    let output = format!(
        r#"
        impl CharacterName {{
            pub fn get_static_data(&self) -> CharacterStaticData {{
                match *self {{ {rows_meta_data} }}
            }}

            pub fn get_effect<A: Attribute>(&self, common_data: &CharacterCommonData, config: &CharacterConfig) -> Option<Box<dyn ChangeAttribute<A>>> {{
                match *self {{ {rows_effect} }}
            }}

            pub fn damage<D: DamageBuilder>(context: &DamageContext<'_, D::AttributeType>, skill_index: usize, skill_config: &CharacterSkillConfig, fumo: Option<Element>) -> D::Result {{
                match context.character_common_data.name {{ {rows_damage} }}
            }}

            pub fn get_target_function_by_role(role_index: usize, team: &TeamQuantization, character: &CharacterCommonData, weapon: &WeaponCommonData) -> Box<dyn TargetFunction> {{
                match character.name {{ {rows_tf} }}
            }}

            #[cfg(not(target_family = "wasm"))]
            pub fn get_skill_map(&self) -> CharacterSkillMap {{
                match *self {{ {rows_skill_map} }}
            }}

            #[cfg(not(target_family = "wasm"))]
            pub fn get_config_data(&self) -> Option<&'static [ItemConfig]> {{
                match *self {{ {rows_config_data} }}
            }}

            #[cfg(not(target_family = "wasm"))]
            pub fn get_config_skill(&self) -> Option<&'static [ItemConfig]> {{
                match *self {{ {rows_config_skill} }}
            }}

            pub fn get_skill_len(&self) -> usize {{
                match *self {{ {rows_skill_len} }}
            }}

            pub fn get_skill_from_str(&self, s: &str) -> Option<usize> {{
                match *self {{
                    {rows_skill_from_str}
                }}
            }}
        }}
        "#,
        rows_meta_data=rows_meta_data,
        rows_effect=rows_effect,
        rows_damage=rows_damage,
        rows_tf=rows_tf,
        rows_skill_map=rows_skill_map,
        rows_config_data=rows_config_data,
        rows_config_skill=rows_config_skill,
        rows_skill_len=rows_skill_len,
        rows_skill_from_str=rows_skill_from_str,
    );

    output.parse().unwrap()
}