def allowModules(self, *modules):
        """
        SecurityOptions.allowModules(module, module, ...): allow modules by
        name. This will also allow the 'module' type.
        """
        for module in modules:
            if type(module) == types.ModuleType:
                module = module.__name__

            if not isinstance(module, bytes):
                module = module.encode('utf-8')

            self.allowedModules[module] = 1

        SecurityOptions.allowModules(module, module, ...): allow modules by
        name. This will also allow the 'module' type.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/jelly.py