code: func RestoreTerminal(fd uintptr, state *State) error {
  	if state == nil {
  		return ErrInvalidState
  	}
  	if err := tcset(fd, &state.termios); err != 0 {
  		return err
  	}
  	return nil
  }
docs: // RestoreTerminal restores the terminal connected to the given file descriptor
  // to a previous state.