def extract(dictionary, keys):
    return dict((key, dictionary[key]) for key in keys if key in dictionary)
Returns a new dictionary with only the keys from the dictionary passed in
dataset/ETHPy150Open bueda/django-comrade/comrade/utils.py/extract