These are all the imports you could do (you are not required to perform all of them, just the ones you need):
in __init__.py (1):
from .folder1.folder2 import file
in __init__.py (2):
from .folder2 import file
in __init__.py (3):
from . import file
Beware that if you actually run one of those __init__.py files, the actual name for the running file will be "__main__" and the relative import will not work. If you intention is that, remove the first dot in the respective import sentence. However it is not always the best practice to run an in-package file because of this issues, but if you do, take note of this.
Alternatively you can do:
in __init__.py (1):
from .folder1 import file
as long as you do also in __init__.py (2):
from .folder2 import file
But you are not required to do that. However it is useful when you want to use file both in the __init__.py (2) and __init__.py (1). But if you don't need to use file in (2) then you can refer to first alternative.