code: func (r *remoteExec) Wait() (*ExecResult, error) {
  	// block until the command is finished and then figure out if the command
  	// successfully exited or if it exited in failure
  	execResult, err := r.collectRemoteStatus(r.session.Wait())
  
  	// emit the result of execution to the audit log
  	emitExecAuditEvent(r.ctx, r.command, execResult, err)
  
  	return execResult, trace.Wrap(err)
  }
docs: // Wait will block while the command executes then return the result as well
  // as emit an event to the Audit Log.