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: use_import_restrictions.rs
    path of file: ./repos/biome/crates/biome_js_analyze/src/analyzers/nursery
    
    the code of the file until where you have to start completion: use biome_analyze::{
    context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic, RuleSource, RuleSourceKind,
};
use bio
    
fn get_restricted_import(module_path: &TokenText) -> Option<ImportRestrictionsState> {
    if !module_path.starts_with('.') {
        return None;
    }

    let mut path_parts: Vec<_> = module_path.text().split('/').collect();
    let mut index_filename = None;

    if let Some(extension) = get_extension(&path_parts) {
        if !SOURCE_EXTENSIONS.contains(&extension) {
            return None; // Resource files are exempt.
        }

        if let Some(basename) = get_basename(&path_parts) {
            if INDEX_BASENAMES.contains(&basename) {
                // We pop the index file because it shouldn't count as a path,
                // component, but we store the file name so we can add it to
                // both the reported path and the suggestion.
                index_filename = path_parts.last().copied();
                path_parts.pop();
            }
        }
    }

    let is_restricted = path_parts
        .iter()
        .filter(|&&part| part != "." && part != "..")
        .count()
        > 1;
    if !is_restricted {
        return None;
    }

    let mut suggestion_parts = path_parts[..path_parts.len() - 1].to_vec();

    // Push the index file if it exists. This makes sure the reported path
    // matches the import path exactly.
    if let Some(index_filename) = index_filename {
        path_parts.push(index_filename);

        // Assumes the user probably wants to use an index file that has the
        // same name as the original.
        suggestion_parts.push(index_filename);
    }

    Some(ImportRestrictionsState {
        path: path_parts.join("/"),
        suggestion: suggestion_parts.join("/"),
    })
}