code: def extract_from_dict(
      keys: Collection[str], source_dict: Dict[str, Any]
  ) -> Dict[str, Any]:
      """Extract the specified keys from source_dict and return them in a new dict.
  
      Parameters
      ----------
      keys : Collection[str]
          The keys to extract from source_dict.
      source_dict : Dict[str, Any]
          The dict to extract keys from. Note that this function mutates source_dict.
  
      Returns
      -------
      Dict[str, Any]
          A new dict containing the keys/values extracted from source_dict.
      """
      d = {}
  
      for k in keys:
          if k in source_dict:
              d[k] = source_dict.pop(k)
  
      return d
  
imports: import configparser
  import os
  from typing import Any, Collection, Dict, cast
label_desc: Use image node_id 1 for calling a global function with example usage: extract_from_dict(keys, source_dict) and returns: d