<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_last_exit_values(self, 	 send, 	 check_exit=True, 	 expect=None, 	 exit_values=None, 	 retry=0, 	 retbool=False):
 		"""Internal function to check the exit value of the shell. Do not use. 		"""

		shutit = self.shutit
		expect = expect or self.default_expect
		if not self.check_exit or not check_exit:
			shutit.log('check_exit configured off, returning', level=logging.DEBUG)
			return True
		if exit_values is None:
			exit_values = ['0']
		if isinstance(exit_values, int):
			exit_values = [str(exit_values)]
		# Don't use send here (will mess up last_output)!
		# Space before "echo" here is sic - we don't need this to show up in bash history
		send_exit_code = ' echo EXIT_CODE:$?'
		shutit.log('Sending with sendline: ' + str(send_exit_code), level=logging.DEBUG)
		assert not self.sendline(ShutItSendSpec(self,
		                                        send=send_exit_code,
		                                        ignore_background=True)), shutit_util.print_debug()
		shutit.log('Expecting: ' + str(expect), level=logging.DEBUG)
		self.expect(expect,timeout=10)
		shutit.log('before: ' + str(self.pexpect_child.before), level=logging.DEBUG)
		res = shutit.match_string(str(self.pexpect_child.before), '^EXIT_CODE:([0-9][0-9]?[0-9]?)$')
		if res not in exit_values or res is None: # pragma: no cover
			res_str = res or str(res)
			shutit.log('shutit_pexpect_child.after: ' + str(self.pexpect_child.after), level=logging.DEBUG)
			shutit.log('Exit value from command: ' + str(send) + ' was:' + res_str, level=logging.DEBUG)
			msg = ('\nWARNING: command:\n' + send + '\nreturned unaccepted exit code: ' + res_str + '\nIf this is expected, pass in check_exit=False or an exit_values array into the send function call.')
			shutit.build['report'] += msg
			if retbool:
				return False
			elif retry == 1 and shutit_global.shutit_global_object.interactive >= 1:
				# This is a failure, so we pass in level=0
				shutit.pause_point(msg + '\n\nInteractive, so not retrying.\nPause point on exit_code != 0 (' + res_str + '). CTRL-C to quit', shutit_pexpect_child=self.pexpect_child, level=0)
			elif retry == 1:
				shutit.fail('Exit value from command\n' + send + '\nwas:\n' + res_str, throw_exception=False) # pragma: no cover
			else:
				return False
		return True