code: def is_ipv4(ip):
      try:
          ipaddress.IPv4Address(ip)
          return True
      except ipaddress.AddressValueError:
          return False
  
file_path: ray/python/ray/autoscaler/_private/vsphere/utils.py
imports: import ipaddress
  import time
  from datetime import datetime
  from enum import Enum
label_desc: Use image node_id 1 for calling a global function with example usage: is_ipv4(ip) and returns: True, False