docs: def detect(self):
          """Detect the IP address."""
          if self.opts_family == AF_INET6:
              kind = IPV6_PUBLIC
          else:  # 'INET':
              kind = IPV4
          theip = None
          try:
              theip = detect_ip(kind)
          except GetIpException:
              LOG.exception("socket detector raised an exception:")
          self.set_current_value(theip)
          return theip