def copy_keys(dic, *keys):
    ret = {}
    for key in keys:
        ret[key] = dic[key]   # Raises KeyError.
    return ret
Return a copy of the dict with only the specified items present.  
dataset/ETHPy150Open mikeorr/WebHelpers2/webhelpers2/containers.py/copy_keys