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