code: def _dqtoi(self, dq):
          
          # hex notation
          if dq.startswith('0x'):
              return self._dqtoi_hex(dq)
  
          # IPv6
          if ':' in dq:
              return self._dqtoi_ipv6(dq)
          elif len(dq) == 32:
              # Assume full heximal notation
              self.v = 6
              return int(dq, 16)
  
          # IPv4
          if '.' in dq:
              return self._dqtoi_ipv4(dq)
  
          raise ValueError('Invalid address input')
docs: Convert dotquad or hextet to long.