code: def pop_kwargs_with_prefix(prefix: str, kwargs: dict) -> dict:
      
      keys = [key for key in kwargs if key.startswith(prefix)]
      return {key[len(prefix):]: kwargs.pop(key) for key in keys}
docs: Pop all items from a dictionary that have keys beginning with a prefix.
  
      Parameters
      ----------
      prefix : str
      kwargs : dict
  
      Returns
      -------
      kwargs : dict
          Items popped from the original directory, with prefix removed.