def intersection(self, E):
        """
        Return the intersection of the sets of self with the sets of E.
        
        (i.e. elements that are common to all of the sets of the
         DictSets.)

        DS&E  <==> DS.intersection(E)
        """           
        if not isinstance(E, DictSet):
            E = DictSet(copy(E))

        # handle case where d=={}
        if E == {}:
            return DictSet()
        
        foo = deepcopy(self)
        for k in set(foo.keys()) | set(E.keys()):
            foo.setdefault(k, [])
            foo[k].intersection_update(E.get(k, []))
            if not foo[k]:
                del foo[k] # delete if empty set

        return foo

        Return the intersection of the sets of self with the sets of E.
        
        (i.e. elements that are common to all of the sets of the
         DictSets.)

        DS&E  <==> DS.intersection(E)
        
recipes/Python/577702_DictSet__specialized_Pythcontainer_datatype/recipe-577702.py