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: filter_langids.rs
    path of file: ./repos/icu4x/components/locid/examples
    
    the code of the file until where you have to start completion: // This file is part of ICU4X. For terms 
    
fn filter_input(input: &str) -> String {
    // 1. Parse the input string into a list of language identifiers.
    let langids = input.split(',').filter_map(|s| s.trim().parse().ok());

    // 2. Filter for LanguageIdentifiers with Language subtag `en`.
    let en_lang: subtags::Language = "en".parse().expect("Failed to parse language subtag.");

    let en_langids = langids.filter(|langid: &LanguageIdentifier| langid.language == en_lang);

    // 3. Serialize the output.
    let en_strs: Vec<String> = en_langids
        .map(|langid| langid.write_to_string().into_owned())
        .collect();

    en_strs.join(", ")
}