How to insert a function in a second window in tkinter?

Hello friends, this is the link to the codes which was provided by Mr elder in his youtube tutorial about tkinter. My question is how do u integrate viewer.py into the second window in base.py. I really cannot understand how to do this and no one was able to help me…