def genD0D1(d0d1: list, arr: list) -> tuple:
	"""Generates filtered D0 and D1 vectors.
	d0d1 is (D0, D1) together as a tuple/list."""
	D0, D1 = list(), list()
	for item in arr:
		if item in d0d1[0]:
			D0.append(item)
		elif item in d0d1[1]:
			D1.append(item)
	return D0, D1