Yes but it's not enough.
Especially in a large codebase where lots of different modules are technically in the same package as each other.
It's easier when a library author is publishing a small package for external consumption by other parties.
Another issue is that in Python any name in a module is implicitly available to be imported from other places.
For example let's say you have "A.py" inside of "A.py" you have "from something import foo". Now "B.py" can do something like "from A import foo".
So now "B" has a dependency that nobody really wanted to create.
Later "foo" may not be needed in "A.py" anymore and it will look like a totally unused import to anyone. Except it is being used by "B.py" too behind your back.
Someone deletes the "unused import" and something else somewhere else breaks because it can no longer import "foo" from "A".
(I have seen variations of this issue happen many many times so don't think I'm making some theoretical scenario.)