docs: def reset_terminal(self):
  		"""Resets the terminal to as good a state as we can try.
  		Tries to ensure that we have 'expect'ed the last prompt seen.
  		TODO: see how https://github.com/noahspurrier/pexpect/blob/master/pxssh.py handles this
  		"""
  		shutit = self.shutit
  		shutit.log('Resetting terminal begin.', level=logging.DEBUG)
  		########################################################################
  		# Cribbed from https://github.com/noahspurrier/pexpect/blob/master/pxssh.py#L145
  		# All of these timing pace values are magic.
  		# I came up with these based on what seemed reliable for
  		# connecting to a heavily loaded machine I have.
  		self.pexpect_child.sendline()
  		time.sleep(0.1)
  		# If latency is worse than these values then this will fail.
  		try:
  			# Clear the buffer before getting the prompt.
  			self.pexpect_child.read_nonblocking(size=10000,timeout=1)
  		except pexpect.TIMEOUT:
  			pass
  		time.sleep(0.1)
  		self.pexpect_child.sendline()
  		time.sleep(0.5)
  		self.pexpect_child.read_nonblocking(size=1000,timeout=1)
  		time.sleep(0.1)
  		self.pexpect_child.sendline()
  		time.sleep(0.5)
  		a = self.pexpect_child.read_nonblocking(size=1000,timeout=1)
  		time.sleep(0.1)
  		self.pexpect_child.sendline()
  		time.sleep(0.5)
  		b = self.pexpect_child.read_nonblocking(size=1000,timeout=1)
  		ld = self.levenshtein_distance(a,b)
  		if len(a) == 0:
  			return False
  		if float(ld)/len(a) < 0.4:
  			return True
  		return False