docs: def lookup_whois(self, inc_raw=False, retry_count=3, get_referral=False,
                       extra_blacklist=None, ignore_referral_errors=False,
                       field_list=None, asn_alts=None, extra_org_map=None,
                       inc_nir=True, nir_field_list=None, asn_methods=None,
                       get_asn_description=True):
          """
          The function for retrieving and parsing whois information for an IP
          address via port 43 (WHOIS).
  
          Args:
              inc_raw (:obj:`bool`): Whether to include the raw whois results in
                  the returned dictionary. Defaults to False.
              retry_count (:obj:`int`): The number of times to retry in case
                  socket errors, timeouts, connection resets, etc. are
                  encountered. Defaults to 3.
              get_referral (:obj:`bool`): Whether to retrieve referral whois
                  information, if available. Defaults to False.
              extra_blacklist (:obj:`list`): Blacklisted whois servers in
                  addition to the global BLACKLIST. Defaults to None.
              ignore_referral_errors (:obj:`bool`): Whether to ignore and
                  continue when an exception is encountered on referral whois
                  lookups. Defaults to False.
              field_list (:obj:`list`): If provided, a list of fields to parse:
                  ['name', 'handle', 'description', 'country', 'state', 'city',
                  'address', 'postal_code', 'emails', 'created', 'updated']
                  If None, defaults to all.
              asn_alts (:obj:`list`): Additional lookup types to attempt if the
                  ASN dns lookup fails. Allow permutations must be enabled.
                  If None, defaults to all ['whois', 'http']. *WARNING*
                  deprecated in favor of new argument asn_methods.
              extra_org_map (:obj:`dict`): Dictionary mapping org handles to
                  RIRs. This is for limited cases where ARIN REST (ASN fallback
                  HTTP lookup) does not show an RIR as the org handle e.g., DNIC
                  (which is now the built in ORG_MAP) e.g., {'DNIC': 'arin'}.
                  Valid RIR values are (note the case-sensitive - this is meant
                  to match the REST result):
                  'ARIN', 'RIPE', 'apnic', 'lacnic', 'afrinic'
                  Defaults to None.
              inc_nir (:obj:`bool`): Whether to retrieve NIR (National Internet
                  Registry) information, if registry is JPNIC (Japan) or KRNIC
                  (Korea). If True, extra network requests will be required.
                  If False, the information returned for JP or KR IPs is
                  severely restricted. Defaults to True.
              nir_field_list (:obj:`list`): If provided and inc_nir, a list of
                  fields to parse:
                  ['name', 'handle', 'country', 'address', 'postal_code',
                  'nameservers', 'created', 'updated', 'contacts']
                  If None, defaults to all.
              asn_methods (:obj:`list`): ASN lookup types to attempt, in order.
                  If None, defaults to all ['dns', 'whois', 'http'].
              get_asn_description (:obj:`bool`): Whether to run an additional
                  query when pulling ASN information via dns, in order to get
                  the ASN description. Defaults to True.
  
          Returns:
              dict: The IP whois lookup results
  
              ::
  
                  {
                      'query' (str) - The IP address
                      'asn' (str) - The Autonomous System Number
                      'asn_date' (str) - The ASN Allocation date
                      'asn_registry' (str) - The assigned ASN registry
                      'asn_cidr' (str) - The assigned ASN CIDR
                      'asn_country_code' (str) - The assigned ASN country code
                      'asn_description' (str) - The ASN description
                      'nets' (list) - Dictionaries containing network
                          information which consists of the fields listed in the
                          ipwhois.whois.RIR_WHOIS dictionary.
                      'raw' (str) - Raw whois results if the inc_raw parameter
                          is True.
                      'referral' (dict) - Referral whois information if
                          get_referral is True and the server is not blacklisted.
                          Consists of fields listed in the ipwhois.whois.RWHOIS
                          dictionary.
                      'raw_referral' (str) - Raw referral whois results if the
                          inc_raw parameter is True.
                      'nir' (dict) - ipwhois.nir.NIRWhois() results if inc_nir
                          is True.
                  }
          """
  
          from .whois import Whois
  
          # Create the return dictionary.
          results = {'nir': None}
  
          # Retrieve the ASN information.
          log.debug('ASN lookup for {0}'.format(self.address_str))
  
          asn_data = self.ipasn.lookup(
              inc_raw=inc_raw, retry_count=retry_count, asn_alts=asn_alts,
              extra_org_map=extra_org_map, asn_methods=asn_methods,
              get_asn_description=get_asn_description
          )
  
          # Add the ASN information to the return dictionary.
          results.update(asn_data)
  
          # Retrieve the whois data and parse.
          whois = Whois(self.net)
          log.debug('WHOIS lookup for {0}'.format(self.address_str))
          whois_data = whois.lookup(
              inc_raw=inc_raw, retry_count=retry_count, response=None,
              get_referral=get_referral, extra_blacklist=extra_blacklist,
              ignore_referral_errors=ignore_referral_errors, asn_data=asn_data,
              field_list=field_list
          )
  
          # Add the WHOIS information to the return dictionary.
          results.update(whois_data)
  
          if inc_nir:
  
              nir = None
              if 'JP' == asn_data['asn_country_code']:
                  nir = 'jpnic'
              elif 'KR' == asn_data['asn_country_code']:
                  nir = 'krnic'
  
              if nir:
  
                  nir_whois = NIRWhois(self.net)
                  nir_data = nir_whois.lookup(
                      nir=nir, inc_raw=inc_raw, retry_count=retry_count,
                      response=None,
                      field_list=nir_field_list, is_offline=False
                  )
  
                  # Add the NIR information to the return dictionary.
                  results['nir'] = nir_data
  
          return results