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: test_diff_module_deps.rs
    path of file: ./repos/farm/crates/compiler/src/update/diff_and_patch_module_graph
    
    the code of the file until where you have to start completion: use std::collections::{HashMap, HashSet};

use farmfe_core::{
  module::{
    module_graph::{ModuleGraph, ModuleGraphEdge, ModuleGraphEdgeDataItem},
    Module,
  },
  plugin::ResolveKind,
};
use farmfe_testing_helpers::construct_test_module_graph;

use crate::update::diff_and_patch_module_graph::ModuleDepsDiffResult;

///
/// ```ignore
///      a
///     / \
///   b    d
///  /
/// c
/// ```
pub fn create_basic_graph() -> ModuleGraph {
  let mut module_graph = ModuleGraph::new();

  module_graph.add_module(Module::new("a".into()));
  module_graph.add_module(Module::new("b".into()));
  module_graph.add_module(Module::new("c".into()));
  module_graph.add_module(Module::new("d".into()));
  module_graph
    .add_edge(&"a".into(), &"b".into(), ModuleGraphEdge::default())
    .unwrap();
  module_graph
    .add_edge(&"a".into(), &"d".into(), ModuleGraphEdge::default())
    
    
fn test_diff_module_deps_4() {
  let mut module_graph = create_basic_graph();
  module_graph
    .add_edge(&"d".into(), &"c".into(), Default::default())
    .unwrap();

  let mut update_module_graph = ModuleGraph::new();
  update_module_graph.add_module(Module::new("a".into()));
  update_module_graph.add_module(Module::new("b".into()));
  update_module_graph
    .add_edge(&"a".into(), &"b".into(), ModuleGraphEdge::default())
    .unwrap();

  let (diff_result, added_modules, removed_modules) =
    super::diff_module_deps(&vec!["a".into()], &module_graph, &update_module_graph);
  assert!(added_modules.is_empty());
  assert_eq!(removed_modules, HashSet::from(["d".into()]));

  assert_eq!(
    diff_result,
    Vec::from([
      (
        "a".into(),
        ModuleDepsDiffResult {
          added: vec![],
          removed: vec![("d".into(), ModuleGraphEdge::default())],
        }
      ),
      (
        "d".into(),
        ModuleDepsDiffResult {
          added: vec![],
          removed: vec![("c".into(), ModuleGraphEdge::default())],
        }
      ),
    ])
  );
}