docs: def multisend(self, sendspec):
  		"""Multisend. Same as send, except it takes multiple sends and expects in a dict that are
  		processed while waiting for the end "expect" argument supplied.
  
  		@param send:                 See send()
  		@param send_dict:            See ShutItSendSpec
  		@param expect:               See send()
  		@param timeout:              See send()
  		@param check_exit:           See send()
  		@param fail_on_empty_before: See send()
  		@param record_command:       See send()
  		@param exit_values:          See send()
  		@param escape:               See send()
  		@param echo:                 See send()
  		@param note:                 See send()
  		@param secret:               See send()
  		@param check_sudo:           See send()
  		@param remove_on_match       See ShutItSendSpec
  		@param loglevel:             See send()
  
  		@return:                     The pexpect return value (ie which expected
  		                             string in the list matched).
  		                             If return is -1, the task was backgrounded. See also multisend.
  		@rtype:                      int
  		"""
  		shutit = self.shutit
  		shutit.handle_note(sendspec.note)
  		expect           = sendspec.expect or self.default_expect
  		send_iteration   = sendspec.send
  		expect_list      = list(sendspec.send_dict)
  		# Put breakout item(s) in last.
  		n_breakout_items = 0
  		shutit.log('In multisend, send: ' + sendspec.send, level=logging.DEBUG)
  		if isinstance(expect, str):
  			shutit.log('Adding: "' + expect + '" to expect list.', level=logging.DEBUG)
  			expect_list.append(expect)
  			n_breakout_items = 1
  		elif isinstance(expect, list):
  			shutit.log('Adding: "' + str(expect) + '" to expect list.', level=logging.DEBUG)
  			for item in expect:
  				expect_list.append(item)
  				n_breakout_items += 1
  		shutit.log('Number of breakout items: ' + str(n_breakout_items), level=logging.DEBUG)
  		while True:
  			# If it's the last n items in the list, it's the breakout one.
  			# Must be a separate sendspec object each time, must be run .
  			res = self.send(ShutItSendSpec(self,
  			                               send=send_iteration,
  			                               expect=expect_list,
  			                               check_exit=sendspec.check_exit,
  			                               fail_on_empty_before=sendspec.fail_on_empty_before,
  			                               timeout=sendspec.timeout,
  			                               record_command=sendspec.record_command,
  			                               exit_values=sendspec.exit_values,
  			                               echo=self.shutit.get_echo_override(sendspec.echo),
  			                               escape=sendspec.escape,
  			                               secret=sendspec.secret,
  			                               check_sudo=sendspec.check_sudo,
  			                               nonewline=sendspec.nonewline,
  			                               ignore_background=sendspec.ignore_background,
  			                               run_in_background=False,
  			                               block_other_commands=True,
  							               loglevel=sendspec.loglevel))
  			if res == -1:
  				# Will be run in the background later.
  				shutit.log('Multisend will be run in the background: ' + str(send_iteration), level=logging.INFO)
  				return -1
  			if res >= len(expect_list) - n_breakout_items:
  				break
  			else:
  				next_send     = sendspec.send_dict[expect_list[res]][0]
  				if next_send is None:
  					shutit.log('None found in next_send - is there no password in the send_dict (first item in array in referenced res)?', level=logging.WARNING)
  				remove_items  = sendspec.send_dict[expect_list[res]][1]
  				send_iteration = next_send
  				if sendspec.remove_on_match and remove_items:
  					shutit.log('Have matched a password (' + expect_list[res] + '), removing password expects from list in readiness of a prompt', level=logging.DEBUG)
  					if isinstance(expect, str):
  						expect_list = [expect]
  					elif isinstance(expect, list):
  						expect_list = expect
  		self.shutit.handle_note_after(note=sendspec.note)
  		return res