docs: def get_whois(self, asn_registry='arin', retry_count=3, server=None,
                    port=43, extra_blacklist=None):
          """
          The function for retrieving whois or rwhois information for an IP
          address via any port. Defaults to port 43/tcp (WHOIS).
  
          Args:
              asn_registry (:obj:`str`): The NIC to run the query against.
                  Defaults to 'arin'.
              retry_count (:obj:`int`): The number of times to retry in case
                  socket errors, timeouts, connection resets, etc. are
                  encountered. Defaults to 3.
              server (:obj:`str`): An optional server to connect to. If
                  provided, asn_registry will be ignored.
              port (:obj:`int`): The network port to connect on. Defaults to 43.
              extra_blacklist (:obj:`list` of :obj:`str`): Blacklisted whois
                  servers in addition to the global BLACKLIST. Defaults to None.
  
          Returns:
              str: The raw whois data.
  
          Raises:
              BlacklistError: Raised if the whois server provided is in the
                  global BLACKLIST or extra_blacklist.
              WhoisLookupError: The whois lookup failed.
              WhoisRateLimitError: The Whois request rate limited and retries
                  were exhausted.
          """
  
          try:
  
              extra_bl = extra_blacklist if extra_blacklist else []
  
              if any(server in srv for srv in (BLACKLIST, extra_bl)):
                  raise BlacklistError(
                      'The server {0} is blacklisted.'.format(server)
                  )
  
              if server is None:
                  server = RIR_WHOIS[asn_registry]['server']
  
              # Create the connection for the whois query.
              conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
              conn.settimeout(self.timeout)
              log.debug('WHOIS query for {0} at {1}:{2}'.format(
                  self.address_str, server, port))
              conn.connect((server, port))
  
              # Prep the query.
              query = self.address_str + '\r\n'
              if asn_registry == 'arin':
  
                  query = 'n + {0}'.format(query)
  
              # Query the whois server, and store the results.
              conn.send(query.encode())
  
              response = ''
              while True:
  
                  d = conn.recv(4096).decode('ascii', 'ignore')
  
                  response += d
  
                  if not d:
  
                      break
  
              conn.close()
  
              if 'Query rate limit exceeded' in response:  # pragma: no cover
  
                  if retry_count > 0:
  
                      log.debug('WHOIS query rate limit exceeded. Waiting...')
                      sleep(1)
                      return self.get_whois(
                          asn_registry=asn_registry, retry_count=retry_count-1,
                          server=server, port=port,
                          extra_blacklist=extra_blacklist
                      )
  
                  else:
  
                      raise WhoisRateLimitError(
                          'Whois lookup failed for {0}. Rate limit '
                          'exceeded, wait and try again (possibly a '
                          'temporary block).'.format(self.address_str))
  
              elif ('error 501' in response or 'error 230' in response
                    ):  # pragma: no cover
  
                  log.debug('WHOIS query error: {0}'.format(response))
                  raise ValueError
  
              return str(response)
  
          except (socket.timeout, socket.error) as e:
  
              log.debug('WHOIS query socket error: {0}'.format(e))
              if retry_count > 0:
  
                  log.debug('WHOIS query retrying (count: {0})'.format(
                      str(retry_count)))
                  return self.get_whois(
                      asn_registry=asn_registry, retry_count=retry_count-1,
                      server=server, port=port, extra_blacklist=extra_blacklist
                  )
  
              else:
  
                  raise WhoisLookupError(
                      'WHOIS lookup failed for {0}.'.format(self.address_str)
                  )
  
          except WhoisRateLimitError:  # pragma: no cover
  
              raise
  
          except BlacklistError:
  
              raise
  
          except:  # pragma: no cover
  
              raise WhoisLookupError(
                  'WHOIS lookup failed for {0}.'.format(self.address_str)
              )