code: def _load_ips_netifaces():
      """load ip addresses with netifaces"""
      import netifaces
  
      global LOCALHOST
      local_ips = []
      public_ips = []
  
      # list of iface names, 'lo0', 'eth0', etc.
      for iface in netifaces.interfaces():
          # list of ipv4 addrinfo dicts
          ipv4s = netifaces.ifaddresses(iface).get(
              netifaces.AF_INET, []
          )
          for entry in ipv4s:
              addr = entry.get("addr")
              if not addr:
                  continue
              if not (
                  iface.startswith("lo") or addr.startswith("127.")
              ):
                  public_ips.append(addr)
              elif not LOCALHOST:
                  LOCALHOST = addr
              local_ips.append(addr)
      if not LOCALHOST:
          # we never found a loopback interface (can this ever happen?), assume common default
          LOCALHOST = "127.0.0.1"
          local_ips.insert(0, LOCALHOST)
      local_ips.extend(["0.0.0.0", ""])
      LOCAL_IPS[:] = _uniq_stable(local_ips)
      PUBLIC_IPS[:] = _uniq_stable(public_ips)
  
imports: import os
  import re
  import socket
  import subprocess
  from subprocess import Popen, PIPE
  from warnings import warn
label_desc: Use image node_id 9 for calling a global function with example usage: _load_ips_netifaces() without return types