project structure – Function/class implementations in of a Python module

Some packages have files containing actual implementations of functions or classes. There are also very famous projects adopting this practice:

I was wondering what are the pros and cons of this practice and when it should be adopted.
I’ve searched online, but it seems that there is not a clear indication or a best practice. A lot of people suggest limiting the content of the to essential things, using them only to structure your package.

I understand that this approach makes clearer interfaces of your module, especially if you have very small modules, with a very limited number of simple classes and functions. On the other hand, if you have a very large number of modules and all the implementations are in the files, you will end having several files with the same name and probably you have to work on them at the same time; moreover, the size of the files can easily get out of hand and make them difficult to read and mantain.

Is there a best practice or at least a rule of thumb here? Is there any interesting reading or discussion on this topic?