docs: def popdict(src, keys):
      """
      Extract all keys (with values) from `src` dictionary as new dictionary
  
      values are removed from source dictionary.
      """
      new = {}
      for key in keys:
          if key in src:
              new[key] = src.pop(key)
      return new