def cleanup(self):

		lost_sheep = []
		killed_sheep = []

		# Find all the sheep who are not servicing requests but have not bleeted
		# in awhile.
		if self.bleet_timeout:
			while (self._bleet_queue and self._bleet_queue.smallest().priority <
					datetime.datetime.now() - self.bleet_timeout):
				lost_sheep.append(self._bleet_queue.pop_smallest().value)

		# Find all the sheep who have been servicing a single request too long.
		if self.service_timeout:
			while (self._service_queue and
					self._service_queue.smallest().priority <
					datetime.datetime.now() - self.service_timeout):
				killed_sheep.append(self._service_queue.pop_smallest().value)

		# Any lost sheep can simply be forgotten about as if they never existed.
		for i in lost_sheep:
			self.remove_sheep(i)

		# Any killed sheep needs to have the test request they were servicing
		# put back into the request queue again and then they need to be
		# forgotten.
		for i in killed_sheep:
			#self.received_request(self._flock[i].servicing_request)
			self.remove_sheep(i)

		return lost_sheep, killed_sheep
Returns two lists in a tuple where the first list is any sheep who timed
dataset/ETHPy150Open ucrcsedept/galah/galah/shepherd/flockmanager.py/FlockManager.cleanup