def mzero(monoid_type):
	"""
	Returns the identity value for monoid_type. Raises TypeError if monoid_type is not a valid monoid.

	There are a number of builtin types that can operate as monoids and they can be used as such
	as is. These "natural" monoids are: int, float, str, and list.
	While thee mzero method will work on monoids derived from the Monoid class,
	this mzero function will work for *all* monoid types, including the "natural" monoids.
	For this reason it is preferable to call this function rather than calling the mzero method directly
	unless you know for sure what type of monoid you're dealing with.

	"""
	try:
		return monoid_type.mzero()
	except AttributeError:
		if isinstance(monoid_type, int) or isinstance(monoid_type, float) or monoid_type == int or monoid_type == float:
			return 0
		elif isinstance(monoid_type, str) or monoid_type == str:
			return ""
		elif isinstance(monoid_type, list) or monoid_type == list:
			return []
		else:
			raise TypeError(str(monoid_type) + " is not a Monoid.")