<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop_kwargs_with_prefix(prefix: str, kwargs: dict) -> dict: """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. """

    keys = [key for key in kwargs if key.startswith(prefix)]
    return {key[len(prefix):]: kwargs.pop(key) for key in keys}