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: contract_inheritance.rs
    path of file: ./repos/foundry/crates/doc/src/preprocessor
    
    the code of the file until where you have to start completion: use super::{Preprocessor, PreprocessorId};
use crate::{document::DocumentContent, Document, ParseSource, PreprocessorOutput};
use forge_fmt::solang_ext::SafeUnwrap;
use std::{collections::HashMap, path::PathBuf};

/// [ContractInher
    
    fn try_link_base(&self, base: &str, documents: &Vec<Document>) -> Option<PathBuf> {
        for candidate in documents {
            if candidate.from_library && !self.include_libraries {
                continue;
            }
            if let DocumentContent::Single(ref item) = candidate.content {
                if let ParseSource::Contract(ref contract) = item.source {
                    if base == contract.name.safe_unwrap().name {
                        return Some(candidate.target_path.clone())
                    }
                }
            }
        }
        None
    }