Move some code to src/multiplicity.py