code: def _iand(self, other):
  		
  		# TODO do we have to create a bag from the other first?
  		if not isinstance(other, _basebag):
  			other = self._from_iterable(other)
  		for elem, old_count in set(self.counts()):
  			other_count = other.count(elem)
  			new_count = min(other_count, old_count)
  			self._set_count(elem, new_count)
  		return self
docs: Set multiplicity of each element to the minimum of the two collections.
  
  		if isinstance(other, _basebag):
  			This runs in O(other.num_unique_elements())
  		else:
  			This runs in O(len(other))