'Turn the given IP string into an integer for comparison.
Args:
ip_str: A string, the IP ip_str.
Returns:
The IP ip_str as an integer.
Raises:
AddressValueError: if ip_str isn\'t a valid IPv4 Address.'

@classmethod
def _ip_int_from_string(cls, ip_str):

    if (not ip_str):
        raise AddressValueError(u'Address    cannot    be    empty')
    octets = ip_str.split(u'.')
    if (len(octets) != 4):
        raise AddressValueError((u'Expected    4    octets    in    %r' % ip_str))
    try:
        return _compat_int_from_byte_vals(map(cls._parse_octet, octets), u'big')
    except ValueError as exc:
        raise AddressValueError((u'%s    in    %r' % (exc, ip_str)))
