def _validate(self, msg):
if not isinstance(msg, self._message_type):<EOL><INDENT>raise TypeError('<STR_LIT>',<EOL>self._message_type.__name__,<EOL>self._code_name or self._name)<EOL><DEDENT>
Validate an Enum value.

        Raises:
          TypeError if the value is not an instance of self._message_type.