def validate_translator(t):
        """Ensure the translator is of the correct length and size."""
        if not isinstance(t, str) or len(t) != 256:
            raise ValueError(
                'The translate argument must be a str of len 256.',
            )
Ensure the translator is of the correct length and size.
cherrypy/_cpdispatch.py