import re


def _verify_ip(ip):
    """Return True if ip matches a valid IP pattern, False otherwise."""
    if not ip:
        return False

    ip_pattern = re.compile('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')
    return ip_pattern.match(ip) is not None