code: def nrzi(data):
  	'''
  	Packet uses NRZI (non-return to zero inverted) encoding, which means 
  	that a 0 is encoded as a change in tone, and a 1 is encoded as 
  	no change in tone.
  	'''
  	current = True
  	for bit in data:
  		if not bit:
  			current = not current 
  		yield currenf nrzi(data):
  	'''
  	Packet uses NRZI (non-return to zero inverted) encoding, which means 
  	that a 0 is encoded as a change in tone, and a 1 is encoded as 
  	no change in tone.
  	'''
  	current = True
  	for bit in data:
  		if not bit:
  			current = not current 
  		yield current
docs: Packet uses NRZI (non-return to zero inverted) encoding, which means 
  	that a 0 is encoded as a change in tone, and a 1 is encoded as 
  	no change in tone.