code: func (t *TTY) MonitorSize(initialSizes ...*remotecommand.TerminalSize) remotecommand.TerminalSizeQueue {
  	outFd, isTerminal := term.GetFdInfo(t.Out)
  	if !isTerminal {
  		return nil
  	}
  
  	t.sizeQueue = &sizeQueue{
  		t: *t,
  		// make it buffered so we can send the initial terminal sizes without blocking, prior to starting
  		// the streaming below
  		resizeChan:   make(chan remotecommand.TerminalSize, len(initialSizes)),
  		stopResizing: make(chan struct{}),
  	}
  
  	t.sizeQueue.monitorSize(outFd, initialSizes...)
  
  	return t.sizeQueue
  }
docs: // MonitorSize monitors the terminal's size. It returns a TerminalSizeQueue primed with
  // initialSizes, or nil if there's no TTY present.