Rather than use a global here, you should use a function attribute as in `multMatVect.dot_modulo`.