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: take_kernels.rs
    path of file: ./repos/tensorbase/crates/arrow/benches
    
    the code of the file until where you have to start completion: // Licensed to the Apache Software Foundation (ASF) under one
// or more
    
fn create_random_index(size: usize, null_density: f32) -> UInt32Array {
    let mut rng = seedable_rng();
    let mut builder = UInt32Builder::new(size);
    for _ in 0..size {
        if rng.gen::<f32>() < null_density {
            builder.append_null().unwrap()
        } else {
            let value = rng.gen_range::<u32, _>(0u32..size as u32);
            builder.append_value(value).unwrap();
        }
    }
    builder.finish()
}