docs: def lookup(self, inc_raw=False, retry_count=3, asn_alts=None,
                 extra_org_map=None, asn_methods=None,
                 get_asn_description=True):
          """
          The wrapper function for retrieving and parsing ASN information for an
          IP address.
  
          Args:
              inc_raw (:obj:`bool`): Whether to include the raw 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.
              asn_alts (:obj:`list`): Additional lookup types to attempt if the
                  ASN dns lookup fails. Allow permutations must be enabled.
                  Defaults to all ['whois', 'http']. *WARNING* deprecated in
                  favor of new argument asn_methods. Defaults to None.
              extra_org_map (:obj:`dict`): 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.
              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 ASN lookup results
  
              ::
  
                  {
                      '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
                      'raw' (str) - Raw ASN results if the inc_raw parameter is
                          True.
                  }
  
          Raises:
              ValueError: methods argument requires one of dns, whois, http.
              ASNRegistryError: ASN registry does not match.
          """
  
          if asn_methods is None:
  
              if asn_alts is None:
  
                  lookups = ['dns', 'whois', 'http']
  
              else:
  
                  from warnings import warn
                  warn('IPASN.lookup() asn_alts argument has been deprecated '
                       'and will be removed. You should now use the asn_methods '
                       'argument.')
                  lookups = ['dns'] + asn_alts
  
          else:
  
              if {'dns', 'whois', 'http'}.isdisjoint(asn_methods):
  
                  raise ValueError('methods argument requires at least one of '
                                   'dns, whois, http.')
  
              lookups = asn_methods
  
          response = None
          asn_data = None
          dns_success = False
          for index, lookup_method in enumerate(lookups):
  
              if index > 0 and not asn_methods and not (
                      self._net.allow_permutations):
  
                  raise ASNRegistryError('ASN registry lookup failed. '
                                         'Permutations not allowed.')
  
              if lookup_method == 'dns':
  
                  try:
  
                      self._net.dns_resolver.lifetime = (
                          self._net.dns_resolver.timeout * (
                              retry_count and retry_count or 1
                          )
                      )
                      response = self._net.get_asn_dns()
                      asn_data_list = []
                      for asn_entry in response:
  
                          asn_data_list.append(self.parse_fields_dns(
                              str(asn_entry)))
  
                      # Iterate through the parsed ASN results to find the
                      # smallest CIDR
                      asn_data = asn_data_list.pop(0)
                      try:
  
                          prefix_len = ip_network(asn_data['asn_cidr']).prefixlen
                          for asn_parsed in asn_data_list:
                              prefix_len_comp = ip_network(
                                  asn_parsed['asn_cidr']).prefixlen
                              if prefix_len_comp > prefix_len:
                                  asn_data = asn_parsed
                                  prefix_len = prefix_len_comp
  
                      except (KeyError, ValueError):  # pragma: no cover
  
                          pass
  
                      dns_success = True
                      break
  
                  except (ASNLookupError, ASNRegistryError) as e:
  
                      log.debug('ASN DNS lookup failed: {0}'.format(e))
                      pass
  
              elif lookup_method == 'whois':
  
                  try:
  
                      response = self._net.get_asn_whois(retry_count)
                      asn_data = self.parse_fields_whois(
                          response)  # pragma: no cover
                      break
  
                  except (ASNLookupError, ASNRegistryError) as e:
  
                      log.debug('ASN WHOIS lookup failed: {0}'.format(e))
                      pass
  
              elif lookup_method == 'http':
  
                  try:
  
                      response = self._net.get_asn_http(
                          retry_count=retry_count
                      )
                      asn_data = self.parse_fields_http(response,
                                                         extra_org_map)
                      break
  
                  except (ASNLookupError, ASNRegistryError) as e:
  
                      log.debug('ASN HTTP lookup failed: {0}'.format(e))
                      pass
  
          if asn_data is None:
  
              raise ASNRegistryError('ASN lookup failed with no more methods to '
                                     'try.')
  
          if get_asn_description and dns_success:
  
              try:
  
                  response = self._net.get_asn_verbose_dns('AS{0}'.format(
                      asn_data['asn']))
                  asn_verbose_data = self.parse_fields_verbose_dns(response)
                  asn_data['asn_description'] = asn_verbose_data[
                      'asn_description']
  
              except (ASNLookupError, ASNRegistryError) as e:  # pragma: no cover
  
                  log.debug('ASN DNS verbose lookup failed: {0}'.format(e))
                  pass
  
          if inc_raw:
  
              asn_data['raw'] = response
  
          return asn_data