def _is_ipv4(self, ip):
try:<EOL><INDENT>p = IPy.IP(ip)<EOL><DEDENT>except ValueError:<EOL><INDENT>return False<EOL><DEDENT>if p.version() == <NUM_LIT:4>:<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
Return true if given arg is a valid IPv4 address