@JuanFMontesinos
no i am a beginer to python all i am thaught by my instructors is if you want to use  a function fn1 present in a file called file.py present in another package pkg1 then use should
import pkg1
pkg1.file.fn1
this is all i know about python i dont know if there is any tutorial explaining how to use classes present in a module (i dont know about importing classes)
what i have come to observe is in pytorch if there is a class cls1 present in file file.py which is present in package pkg1 to use class cls1 we
import pk1
pkg1.cls1
we omit file.py (ie we omit file.py insted of writting pkg1.file.cls1 we write as above)
correct me if i am wrong and please tell what i have written above is true
i wonder why using function requires prefixing file name and using class doesnot