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: chunk_prefetch_startup.rs
    path of file: ./repos/rspack/crates/rspack_plugin_runtime/src/runtime_module
    
    the code of the file until where you have to start completion: use itertools::Itertools;
use rspack_core::{
  impl_runtime_module,
  rspack_sources::{BoxSource, RawSource, SourceExt},
  ChunkUkey, Compilation, RuntimeGlobals, RuntimeModule, RuntimeModuleStage,
};
use rspack_identifier::Identifier;
use rspack_util::source_map::SourceMapKind;

#[impl_runtime_module]
#[derive(Debug, Eq)]
pub struct ChunkPrefetchStartupRuntimeModule {
  id: Identifier,
  startup_chunks: Vec<(Vec<ChunkUkey>, Vec<ChunkUkey>)>,
  chunk: Option<ChunkUkey>,
}

impl ChunkPrefetchStartupRuntimeModule {
  pub fn new(startup_chunks: Vec<(Vec<ChunkUkey>, Vec<ChunkUkey>)>) -> Self {
    Self {
      id: Identifier::from("webpack/runtime/chunk_prefetch_startup"),
      startup_chunks,
      chunk: None,
      source_map_kind: SourceMapKind::None,
      custom_source: None,
    }
  }
}

impl RuntimeModule for ChunkPrefetchStartupRuntim
    
  fn generate(&self, compilation: &Compilation) -> BoxSource {
    let chunk_ukey = self.chunk.expect("chunk do not attached");
    RawSource::from(
      self
        .startup_chunks
        .iter()
        .map(|(group_chunks, child_chunks)| {
          let group_chunk_ids = group_chunks
            .iter()
            .filter_map(|c| {
              if c.to_owned().eq(&chunk_ukey) {
                compilation.chunk_by_ukey.expect_get(c).id.to_owned()
              } else {
                None
              }
            })
            .collect_vec();

          let child_chunk_ids = child_chunks
            .iter()
            .filter_map(|c| compilation.chunk_by_ukey.expect_get(c).id.to_owned())
            .collect_vec();

          let body = match child_chunks.len() {
            x if x < 3 => child_chunk_ids
              .iter()
              .map(|id| {
                format!(
                  "{}({});",
                  RuntimeGlobals::PREFETCH_CHUNK,
                  serde_json::to_string(&id).expect("invalid json tostring")
                )
              })
              .join("\n"),
            _ => {
              format!(
                "{}.map({})",
                serde_json::to_string(&child_chunk_ids).expect("invalid json tostring"),
                RuntimeGlobals::PREFETCH_CHUNK
              )
            }
          };

          format!(
            r#"
            {}(0, {}, function() {{
              {}
            }}, 5);
            "#,
            RuntimeGlobals::ON_CHUNKS_LOADED,
            serde_json::to_string(&group_chunk_ids).expect("invalid json tostring"),
            body
          )
        })
        .join("\n"),
    )
    .boxed()
  }