def _call(self, cmd, get_output):
server_err = self.server_logger()<EOL>chan = self.get_client().get_transport().open_session()<EOL>try:<EOL><INDENT>logger.debug("<STR_LIT>",<EOL>cmd, "<STR_LIT>" if get_output else "<STR_LIT>")<EOL>chan.exec_command('<STR_LIT>' % shell_escape(cmd))<EOL>output = b'<STR_LIT>'<EOL>while True:<EOL><INDENT>r, w, e = select.select([chan], [], [])<EOL>if chan not in r:<EOL><INDENT>continue  <EOL><DEDENT>recvd = False<EOL>while chan.recv_stderr_ready():<EOL><INDENT>data = chan.recv_stderr(<NUM_LIT>)<EOL>server_err.append(data)<EOL>recvd = True<EOL><DEDENT>while chan.recv_ready():<EOL><INDENT>data = chan.recv(<NUM_LIT>)<EOL>if get_output:<EOL><INDENT>output += data<EOL><DEDENT>recvd = True<EOL><DEDENT>if not recvd and chan.exit_status_ready():<EOL><INDENT>break<EOL><DEDENT><DEDENT>output = output.rstrip(b'<STR_LIT:\r\n>')<EOL>return chan.recv_exit_status(), output<EOL><DEDENT>finally:<EOL><INDENT>server_err.done()<EOL>chan.close()<EOL><DEDENT>
Calls a command through the SSH connection.

        Remote stderr gets printed to this program's stderr. Output is captured
        and may be returned.