docs: def wait(self, cadence=2, sendspec=None):
  		"""Does not return until all background commands are completed.
  		"""
  		shutit = self.shutit
  		shutit.log('In wait.', level=logging.DEBUG)
  		if sendspec:
  			cadence = sendspec.wait_cadence
  		shutit.log('Login stack is:\n' + str(self.login_stack), level=logging.DEBUG)
  		while True:
  			# go through each background child checking whether they've finished
  			res, res_str, background_object = self.login_stack.get_current_login_item().check_background_commands_complete()
  			shutit.log('Checking: ' + str(background_object) + '\nres: ' + str(res) + '\nres_str' + str(res_str), level=logging.DEBUG)
  			if res:
  				# When all have completed, break return the background command objects.
  				break
  			elif res_str in ('S','N'):
  				# Do nothing, this is an started or not-running task.
  				pass
  			elif res_str == 'F':
  				assert background_object is not None, shutit_util.print_debug()
  				assert isinstance(background_object, ShutItBackgroundCommand), shutit_util.print_debug()
  				shutit.log('Failure in: ' + str(self.login_stack), level=logging.DEBUG)
  				self.pause_point('Background task: ' + background_object.sendspec.original_send + ' :failed.')
  				return False
  			else:
  				self.shutit.fail('Un-handled exit code: ' + res_str) # pragma: no cover
  			time.sleep(cadence)
  		shutit.log('Wait complete.', level=logging.DEBUG)
  		return True