@classmethod<EOL><INDENT>def _parse_hextet(cls, hextet_str):<DEDENT>
<EOL>if not cls._HEX_DIGITS.issuperset(hextet_str):<EOL><INDENT>raise ValueError("<STR_LIT>" % hextet_str)<EOL><DEDENT>if len(hextet_str) > <NUM_LIT:4>:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise ValueError(msg % hextet_str)<EOL><DEDENT>return int(hextet_str, <NUM_LIT:16>)<EOL>
Convert an IPv6 hextet string into an integer.

        Args:
            hextet_str: A string, the number to parse.

        Returns:
            The hextet as an integer.

        Raises:
            ValueError: if the input isn't strictly a hex number from
              [0..FFFF].