code: def _is_ipv4(self, ip):
          
          try:
              p = IPy.IP(ip)
          except ValueError:
              return False
  
          if p.version() == 4:
              return True
          return False
docs: Return true if given arg is a valid IPv4 address