rasa/core/utils.py
def extract_args(kwargs: Dict[Text, Any],
                 keys_to_extract: Set[Text]
                 ) -> Tuple[Dict[Text, Any], Dict[Text, Any]]:
    """Go through the kwargs and filter out the specified keys.

    Return both, the filtered kwargs as well as the remaining kwargs."""

    remaining = {}
    extracted = {}
    for k, v in kwargs.items():
        if k in keys_to_extract:
            extracted[k] = v
        else:
            remaining[k] = v

    return extracted, remaining
Go through the kwargs and filter out the specified keys.

    Return both, the filtered kwargs as well as the remaining kwargs.
Go through the kwargs and filter out the specified keys.
Return both, the filtered kwargs as well as the remaining kwargs.
Go through the kwargs and filter out the specified keys . Return both the filtered kwargs as well as the remaining kwargs .
def extract_args(kwargs: Dict[Text, Any],
                 keys_to_extract: Set[Text]
                 ) -> Tuple[Dict[Text, Any], Dict[Text, Any]]:
    remaining = {}
    extracted = {}
    for k, v in kwargs.items():
        if k in keys_to_extract:
            extracted[k] = v
        else:
            remaining[k] = v
    return extracted, remaining
def extract_args ( kwargs : Dict [ Text , Any ] , keys_to_extract : Set [ Text ] ) -> Tuple [ Dict [ Text , Any ] , Dict [ Text , Any ] ] : remaining = { } extracted = { } for k , v in kwargs . items ( ) : if k in keys_to_extract : extracted [ k ] = v else : remaining [ k ] = v return extracted , remaining
Go through the kwargs and filter out the specified keys.
Go through the kwargs and filter out the specified keys .
"""Go through the kwargs and filter out the specified keys.

    Return both, the filtered kwargs as well as the remaining kwargs."""
kwargs
Dict[Text, Any]
keys_to_extract
Set[Text]