<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_mapping(cls, mapping):
 		"""Create a bag from a dict of elem->count. 		Each key in the dict is added if the value is > 0. 		Raises: 			ValueError: If any count is < 0. 		"""

		out = cls()
		for elem, count in mapping.items():
			out._set_count(elem, count)
		return out