code: def query(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
            tcp=False, source=None, raise_on_no_answer=True, resolver=None):
      
      if resolver is None:
          resolver = get_default_resolver()
      return resolver.query(qname, rdtype, rdclass, tcp, source, raise_on_no_answer)
docs: Query nameservers to find the answer to the question.
  
      This is a convenience function that uses the default resolver
      object to make the query.
      @see: L{dns.resolver.Resolver.query} for more information on the
      parameters.