<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exec_command(self, command, bufsize=-1, get_pty=False):
 """ Execute a command in the connection @param command: command to execute @type command: str @param bufsize: buffer size @type bufsize: int @param get_pty: get pty @type get_pty: bool @return: the stdin, stdout, and stderr of the executing command @rtype: tuple(L{paramiko.ChannelFile}, L{paramiko.ChannelFile}, L{paramiko.ChannelFile}) @raise SSHException: if the server fails to execute the command """

        self.last_command = command
        return self.cli.exec_command(command, bufsize, get_pty=get_pty)