<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extent(self):
 		""" 		Return the segment whose end-points denote the maximum and 		minimum extent of the segmentlist. Does not require the 		segmentlist to be coalesced. 		"""

		if not len(self):
			raise ValueError("empty list")
		min, max = self[0]
		for lo, hi in self:
			if min > lo:
				min = lo
			if max < hi:
				max = hi
		return segment(min, max)