Hi,
An error is returned when running the program:
ImportError: cannot import name 'gcd' from 'fractions' (/home/lukas/anaconda3/lib/python3.9/fractions.py)
As per stack overflow the problem is caused by the networkx module which import statements changed upon python updates (I am using python 3.9.7).
BR
Lukas