<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract(dictionary, keys):
 """ Extract only the specified keys from a dict :param dictionary: source dictionary :param keys: list of keys to extract :return dict: extracted dictionary """

    return dict((k, dictionary[k]) for k in keys if k in dictionary)