def iterator(regions):
	"""
	Collect misfired regions from file if such exist.

	:param regions: number of regions <list>.
	:return: misfired region ids <list> or all region ids <list>.
	"""
	misfired = []
	# look for misfired regions in file
	with open("misfired.txt", 'r') as file:
		for line in file:
			misfired.append(int(line.strip('\n')))
	# if file is not empty return list of misfired regions as list
	if misfired:
		return misfired
	# return non last date regions
	else:
		return [x for x in range(1, regions + 1)]