On Python 3.9, I see
from ns import network
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'network' from 'ns' (/home/user/.local/lib/python3.9/site-packages/ns/__init__.py)
Python 3.7 is not yet available anymore on recent Ubuntu and Debian, so we should to take care soon.