def isModuleAllowed(self, moduleName):
        """
        SecurityOptions.isModuleAllowed(moduleName) -> boolean
        returns 1 if a module by that name is allowed, 0 otherwise
        """
        if not isinstance(moduleName, bytes):
            moduleName = moduleName.encode('utf-8')

        return moduleName in self.allowedModules

        SecurityOptions.isModuleAllowed(moduleName) -> boolean
        returns 1 if a module by that name is allowed, 0 otherwise
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/jelly.py