import bisect


def getIndex(abdlist, pos):
	"""
	Determine the item in the abdlist that is to the immediate right of the pos.
	This is the basically identify the closest target region
	"""
	i = bisect.bisect_right(abdlist, pos)
	return i