<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _isub(self, other):
 		"""Discard the elements of other from self. 		if isinstance(it, _basebag):
 			This runs in O(it.num_unique_elements()) 		else: 			This runs in O(len(it)) 		"""

		if isinstance(other, _basebag):
			for elem, other_count in other.counts():
				try:
					self._increment_count(elem, -other_count)
				except ValueError:
					self._set_count(elem, 0)
		else:
			for elem in other:
				try:
					self._increment_count(elem, -1)
				except ValueError:
					pass
		return self