code: def intersection_update(self, other):
          
          if not isinstance(other, Set):
              raise ValueError('other must be a Set instance')
          if self is other:
              return
          # we make a copy of the list so that we can remove items from
          # the list without breaking the iterator.
          for item in list(self.items):
              if item not in other.items:
                  self.items.remove(item)
docs: Update the set, removing any elements from other which are not
          in both sets.
          @param other: the collection of items with which to update the set
          @type other: Set object