def METHOD_NAME():
    interfaces = agent.status().get("inventory", {}).get("interfaces")
    if not interfaces:
        return
    ip_addresses = interfaces[0].get("ipV4Addresses" if is_ipv4 else "ipV6Addresses")
    if not ip_addresses:
        return
    ip_addr = ip_addresses[0]
    ip_interface = IPv4Interface(ip_addr) if is_ipv4 else IPv6Interface(ip_addr)
    return str(ip_interface.ip)