code: def remove_missing_keys(src, to_update):
      keys = list(src.keys())
      for key in keys:
          if key not in to_update:
              del src[key]
          elif isinstance(src[key], dict):
              remove_missing_keys(src[key], to_update[key])
  
      return src
  
file_path: dvc/dvc/utils/collections.py
imports: from collections.abc import Mapping
  from typing import Dict, Iterable, List, Union, no_type_check
label_desc: Use image node_id 3 for calling a global function with example usage: remove_missing_keys(src, to_update) and returns: src