_parse_multi_byte parses x as a multibyte representation to get the
          int value of this AbstractUVarIntField.

        @param str s: the multibyte string to parse.
        @return int: The parsed int value represented by this AbstractUVarIntField.  # noqa: E501
        @raise: AssertionError
        @raise: Scapy_Exception if the input value encodes an integer larger than 1<<64  # noqa: E501

def _parse_multi_byte(self, s):
        # type: (str) -> int
        """ _parse_multi_byte parses x as a multibyte representation to get the
          int value of this AbstractUVarIntField.

        @param str s: the multibyte string to parse.
        @return int: The parsed int value represented by this AbstractUVarIntField.  # noqa: E501
        @raise: AssertionError
        @raise: Scapy_Exception if the input value encodes an integer larger than 1<<64  # noqa: E501
        """

        assert(len(s) >= 2)

        tmp_len = len(s)

        value = 0
        i = 1
        byte = orb(s[i])
        # For CPU sake, stops at an arbitrary large number!
        max_value = 1 << 64
        # As long as the MSG is set, an another byte must be read
        while byte & 0x80:
            value += (byte ^ 0x80) << (7 * (i - 1))
            if value > max_value:
                raise error.Scapy_Exception(
                    'out-of-bound value: the string encodes a value that is too large (>2^{64}): {}'.format(value)  # noqa: E501
                )
            i += 1
            assert i < tmp_len, 'EINVAL: x: out-of-bound read: the string ends before the AbstractUVarIntField!'  # noqa: E501
            byte = orb(s[i])
        value += byte << (7 * (i - 1))
        value += self._max_value

        assert(value >= 0)
        return value