def find_next_chunk(chunks, pos, IDs):
	"""Find the next chunk from the position specified which has an ID in the list of IDs given."""

	while pos < len(chunks):

		if chunks[pos][0] in IDs:

			# Found a chunk with ID in the list
			return pos, chunks[pos]

		# Otherwise continue looking
		pos = pos + 1

	return None, None