Window View

I was doing some experimentation with windows and views so I created 2 random kra files and then some buttons to trigger some operations:

import krita
import os

def Start():
    file_01 = os.path.normpath("C:\\Users\\EyeOd\\Desktop\\test\\file_01.kra")
    file_02 = os.path.normpath("C:\\Users\\EyeOd\\Desktop\\test\\file_02.kra")
    f1 = Krita.instance().openDocument(file_01)
    f2 = Krita.instance().openDocument(file_02)
    view = Krita.instance().activeWindow().addView(f1)

def Doc_1():
    # f1 = Krita.instance().openDocument(file_01)

def Doc_2():
    # f2 = Krita.instance().openDocument(file_02)

so if I do :

Doc_1() # error

It will switch view once but only once and the basic idea I was trying to do is switch between each doc freely. it seems I am loosing a view after doing a change and I am not sure how I am loosing the reference to the view. However if I uncomment the lines within the doc functions I am able to swap between file views as it is openning the file once again.

Is there a way to open both files and then swap between views?