def restore(window):
    """
    Restores a window:

        - shows the window
        - raises the awindow
        - activates the window

    :param window: window to restore
    :type window: PyQt5.QtWidgets.QMainWindow
    """
    if window.isMinimized():
        window.showNormal()
    else:
        window.show()
    window.activateWindow()
    window.raise_()
