def METHOD_NAME(
    results: dict, key: Text, head_name: Text, video: Video, scale_to_height=None
):
    nonlocal win_x
    scale = None
    if scale_to_height:
        overlay_height = results[key].shape[1]  # frames, height, width, channels
        scale = scale_to_height // overlay_height
    if key == "confmap":
        win = demo_confmaps(results[key], video, scale=scale)
    elif key == "paf":
        win = demo_pafs(results[key], video, scale=scale, decimation=2)
    else:
        raise ValueError(f"Cannot show preview window for {key}")
    win.activateWindow()
    win.setWindowTitle(f"{head_name} {key}")
    win.resize(400, 400)
    win.move(win_x, 300)
    win_x += 420