def parentChainContainsCycle(term):
	"""
	Check if the chain of parents from an item contains a cycle by navigating along the sequence of parents

	:param term: The ontology term to check
	:type term: pronto.Term
	:return: Whether the parent chain contains a cycle
	:rtype: bool
	"""

	seen = set()
	toProcessed = [term]
	while len(toProcessed) > 0:
		processing = toProcessed.pop(0)
		if processing in seen:
			return True
		seen.add(processing)

		toProcessed += list(processing.parents)
	return False