code: def _get_ip(self, interface):
          
          if interface in ni.interfaces():
              addresses = ni.ifaddresses(interface)
              if ni.AF_INET in addresses:
                  return addresses[ni.AF_INET][0]["addr"]
          return ""
docs: Returns the interface's IPv4 address if device exists and has a valid
          ip address. Otherwise, returns an empty string