def _is_valid_ip(self, address):
        """Validate the dotted decimal notation IP/netmask string.

        Args:
            address: A string, either representing a quad-dotted ip
                or an integer which is a valid IPv4 IP address.

        Returns:
            A boolean, True if the string is a valid dotted decimal IP
            string.

        """
        octets = address.split('.')
        if len(octets) == 1:
            # We have an integer rather than a dotted decimal IP.
            try:
                return int(address) >= 0 and int(address) <= self._ALL_ONES
            except ValueError:
                return False

        if len(octets) != 4:
            return False

        for octet in octets:
            try:
                if not 0 <= int(octet) <= 255:
                    return False
            except __HOLE__:
                return False
        return True
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/lib/ipaddr.py/_BaseV4._is_valid_ip