def isTypeAllowed(self, typeName):
        """
        SecurityOptions.isTypeAllowed(typeName) -> boolean
        Returns 1 if the given type is allowed, 0 otherwise.
        """
        if not isinstance(typeName, bytes):
            typeName = typeName.encode('utf-8')

        return (typeName in self.allowedTypes or b'.' in typeName)

        SecurityOptions.isTypeAllowed(typeName) -> boolean
        Returns 1 if the given type is allowed, 0 otherwise.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/jelly.py