Hi,
In a python package you can import objets in __init__. Those objects can be directly called as you aforementioned.
So if “tensor” exist in a file called torch.core.tensor (for example) if you write in torch’s __init__
from torch.core.tensor import tensor

you will be able to call torch.tensor