def RestrictDict( aDict, restrictSet ):
    """Return a dict which has the mappings from the original dict only for keys in the given set"""
    return dict( [ ( k, aDict[k] ) for k in frozenset( restrictSet ) & frozenset( aDict.keys() ) ] )