window-normalize-window

window-normalize-window is a compiled Lisp function in `window.el'.

(window-normalize-window WINDOW &optional LIVE-ONLY)

Return the window specified by WINDOW.
If WINDOW is nil, return the selected window. Otherwise, if
WINDOW is a live or an internal window, return WINDOW; if
LIVE-ONLY is non-nil, return WINDOW for a live window only.
Otherwise, signal an error.