Some of my code use the now deprecated imp package to find a module
toolboxFile, toolboxPath, toolboxDescription = imp.find_module(\"Tools\")
I found this worked as a replacement for imp.find_module()
importlib.machinery.PathFinder().find_spec(modName, modDirList)